Refactored Forms and Classes

This commit is contained in:
MaxXor 2015-01-27 23:47:13 +01:00
parent 3ff75f9bc9
commit 213cb361b7
37 changed files with 620 additions and 620 deletions

View File

@ -11,14 +11,14 @@ namespace xServer.Core.Commands
{
public static class CommandHandler
{
public static void HandleInitialize(Client client, Initialize packet, frmMain mainForm)
public static void HandleInitialize(Client client, Initialize packet, FrmMain mainForm)
{
if (client.EndPoint.Address.ToString() == "255.255.255.255")
return;
mainForm.listenServer.ConnectedClients++;
mainForm.listenServer.AllTimeConnectedClients++;
mainForm.updateWindowTitle(mainForm.listenServer.ConnectedClients, mainForm.lstClients.SelectedItems.Count);
mainForm.ListenServer.ConnectedClients++;
mainForm.ListenServer.AllTimeConnectedClients++;
mainForm.UpdateWindowTitle(mainForm.ListenServer.ConnectedClients, mainForm.lstClients.SelectedItems.Count);
new Thread(new ThreadStart(() =>
{
@ -47,19 +47,19 @@ namespace xServer.Core.Commands
if (XMLSettings.ShowPopup)
ShowPopup(client, mainForm);
client.Value.isAuthenticated = true;
client.Value.IsAuthenticated = true;
}
catch
{ }
})).Start();
}
private static void ShowPopup(Client c, frmMain mainForm)
private static void ShowPopup(Client c, FrmMain mainForm)
{
mainForm.nIcon.ShowBalloonTip(30, string.Format("Client connected from {0}!", c.Value.Country), string.Format("IP Address: {0}\nOperating System: {1}", c.EndPoint.Address.ToString(), c.Value.OperatingSystem), ToolTipIcon.Info);
}
public static void HandleStatus(Client client, Status packet, frmMain mainForm)
public static void HandleStatus(Client client, Status packet, FrmMain mainForm)
{
new Thread(new ThreadStart(() =>
{
@ -79,7 +79,7 @@ namespace xServer.Core.Commands
})).Start();
}
public static void HandleUserStatus(Client client, UserStatus packet, frmMain mainForm)
public static void HandleUserStatus(Client client, UserStatus packet, FrmMain mainForm)
{
new Thread(new ThreadStart(() =>
{
@ -101,16 +101,16 @@ namespace xServer.Core.Commands
public static void HandleRemoteDesktopResponse(Client client, DesktopResponse packet)
{
if (client.Value.frmRDP == null)
if (client.Value.FrmRdp == null)
return;
if (client.Value.lastDesktop == null)
if (client.Value.LastDesktop == null)
{
Bitmap newScreen = (Bitmap)Helper.Helper.CByteToImg(packet.Image);
client.Value.lastDesktop = newScreen;
client.Value.frmRDP.Invoke((MethodInvoker)delegate
client.Value.LastDesktop = newScreen;
client.Value.FrmRdp.Invoke((MethodInvoker)delegate
{
client.Value.frmRDP.picDesktop.Image = newScreen;
client.Value.FrmRdp.picDesktop.Image = newScreen;
});
newScreen = null;
}
@ -122,31 +122,31 @@ namespace xServer.Core.Commands
using (Graphics g = Graphics.FromImage(newScreen))
{
g.DrawImage(client.Value.lastDesktop, 0, 0, newScreen.Width, newScreen.Height);
g.DrawImage(client.Value.LastDesktop, 0, 0, newScreen.Width, newScreen.Height);
g.DrawImage(screen, 0, 0, newScreen.Width, newScreen.Height);
}
client.Value.lastDesktop = newScreen;
client.Value.frmRDP.Invoke((MethodInvoker)delegate
client.Value.LastDesktop = newScreen;
client.Value.FrmRdp.Invoke((MethodInvoker)delegate
{
client.Value.frmRDP.picDesktop.Image = newScreen;
client.Value.FrmRdp.picDesktop.Image = newScreen;
});
screen = null;
newScreen = null;
}
packet.Image = null;
client.Value.lastDesktopSeen = true;
client.Value.LastDesktopSeen = true;
}
public static void HandleGetProcessesResponse(Client client, GetProcessesResponse packet)
{
if (client.Value.frmTM == null)
if (client.Value.FrmTm == null)
return;
client.Value.frmTM.Invoke((MethodInvoker)delegate
client.Value.FrmTm.Invoke((MethodInvoker)delegate
{
client.Value.frmTM.lstTasks.Items.Clear();
client.Value.FrmTm.lstTasks.Items.Clear();
});
new Thread(new ThreadStart(() =>
@ -158,9 +158,9 @@ namespace xServer.Core.Commands
ListViewItem lvi = new ListViewItem(new string[] { packet.Processes[i], packet.IDs[i].ToString(), packet.Titles[i] });
try
{
client.Value.frmTM.Invoke((MethodInvoker)delegate
client.Value.FrmTm.Invoke((MethodInvoker)delegate
{
client.Value.frmTM.lstTasks.Items.Add(lvi);
client.Value.FrmTm.lstTasks.Items.Add(lvi);
});
}
catch
@ -172,25 +172,25 @@ namespace xServer.Core.Commands
public static void HandleDrivesResponse(Client client, DrivesResponse packet)
{
if (client.Value.frmFM == null)
if (client.Value.FrmFm == null)
return;
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.cmbDrives.Items.Clear();
client.Value.frmFM.cmbDrives.Items.AddRange(packet.Drives);
client.Value.frmFM.cmbDrives.SelectedIndex = 0;
client.Value.FrmFm.cmbDrives.Items.Clear();
client.Value.FrmFm.cmbDrives.Items.AddRange(packet.Drives);
client.Value.FrmFm.cmbDrives.SelectedIndex = 0;
});
}
public static void HandleDirectoryResponse(Client client, DirectoryResponse packet)
{
if (client.Value.frmFM == null)
if (client.Value.FrmFm == null)
return;
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.lstDirectory.Items.Clear();
client.Value.FrmFm.lstDirectory.Items.Clear();
});
new Thread(new ThreadStart(() =>
@ -198,9 +198,9 @@ namespace xServer.Core.Commands
ListViewItem lviBack = new ListViewItem(new string[] { "..", "", "Directory" });
lviBack.Tag = "dir";
lviBack.ImageIndex = 0;
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.lstDirectory.Items.Add(lviBack);
client.Value.FrmFm.lstDirectory.Items.Add(lviBack);
});
if (packet.Folders.Length != 0)
@ -216,9 +216,9 @@ namespace xServer.Core.Commands
try
{
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.lstDirectory.Items.Add(lvi);
client.Value.FrmFm.lstDirectory.Items.Add(lvi);
});
}
catch
@ -240,9 +240,9 @@ namespace xServer.Core.Commands
try
{
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.lstDirectory.Items.Add(lvi);
client.Value.FrmFm.lstDirectory.Items.Add(lvi);
});
}
catch
@ -251,7 +251,7 @@ namespace xServer.Core.Commands
}
}
client.Value.lastDirectorySeen = true;
client.Value.LastDirectorySeen = true;
})).Start();
}
@ -271,9 +271,9 @@ namespace xServer.Core.Commands
int index = 0;
try
{
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
foreach (ListViewItem lvi in client.Value.frmFM.lstTransfers.Items)
foreach (ListViewItem lvi in client.Value.FrmFm.lstTransfers.Items)
{
if (packet.ID.ToString() == lvi.SubItems[0].Text)
{
@ -292,19 +292,19 @@ namespace xServer.Core.Commands
{
try
{
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.lstTransfers.Items[index].SubItems[1].Text = "Saving...";
client.Value.FrmFm.lstTransfers.Items[index].SubItems[1].Text = "Saving...";
});
using (FileStream stream = new FileStream(downloadPath, FileMode.Create))
{
stream.Write(packet.FileByte, 0, packet.FileByte.Length);
}
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.lstTransfers.Items[index].SubItems[1].Text = "Completed";
client.Value.frmFM.lstTransfers.Items[index].ImageIndex = 1;
client.Value.FrmFm.lstTransfers.Items[index].SubItems[1].Text = "Completed";
client.Value.FrmFm.lstTransfers.Items[index].ImageIndex = 1;
});
}
catch
@ -315,10 +315,10 @@ namespace xServer.Core.Commands
{
try
{
client.Value.frmFM.Invoke((MethodInvoker)delegate
client.Value.FrmFm.Invoke((MethodInvoker)delegate
{
client.Value.frmFM.lstTransfers.Items[index].SubItems[1].Text = "Canceled";
client.Value.frmFM.lstTransfers.Items[index].ImageIndex = 0;
client.Value.FrmFm.lstTransfers.Items[index].SubItems[1].Text = "Canceled";
client.Value.FrmFm.lstTransfers.Items[index].ImageIndex = 0;
});
}
catch
@ -328,7 +328,7 @@ namespace xServer.Core.Commands
public static void HandleGetSystemInfoResponse(Client client, GetSystemInfoResponse packet)
{
if (client.Value.frmSI == null)
if (client.Value.FrmSi == null)
return;
ListViewItem[] lviCollection = new ListViewItem[packet.SystemInfos.Length / 2];
@ -342,22 +342,22 @@ namespace xServer.Core.Commands
}
}
if (client.Value.frmSI == null)
if (client.Value.FrmSi == null)
return;
try
{
client.Value.frmSI.Invoke((MethodInvoker)delegate
client.Value.FrmSi.Invoke((MethodInvoker)delegate
{
client.Value.frmSI.lstSystem.Items.RemoveAt(2); // Loading... Information
client.Value.FrmSi.lstSystem.Items.RemoveAt(2); // Loading... Information
foreach(var lviItem in lviCollection)
{
if (lviItem != null)
client.Value.frmSI.lstSystem.Items.Add(lviItem);
client.Value.FrmSi.lstSystem.Items.Add(lviItem);
}
});
ListViewExtensions.autosizeColumns(client.Value.frmSI.lstSystem);
ListViewExtensions.autosizeColumns(client.Value.FrmSi.lstSystem);
}
catch
{ }
@ -365,16 +365,16 @@ namespace xServer.Core.Commands
public static void HandleMonitorsResponse(Client client, MonitorsResponse packet)
{
if (client.Value.frmRDP == null)
if (client.Value.FrmRdp == null)
return;
try
{
client.Value.frmRDP.Invoke((MethodInvoker)delegate
client.Value.FrmRdp.Invoke((MethodInvoker)delegate
{
for (int i = 0; i < packet.Number; i++)
client.Value.frmRDP.cbMonitors.Items.Add(string.Format("Monitor {0}", i + 1));
client.Value.frmRDP.cbMonitors.SelectedIndex = 0;
client.Value.FrmRdp.cbMonitors.Items.Add(string.Format("Monitor {0}", i + 1));
client.Value.FrmRdp.cbMonitors.SelectedIndex = 0;
});
}
catch
@ -383,14 +383,14 @@ namespace xServer.Core.Commands
public static void HandleShellCommandResponse(Client client, ShellCommandResponse packet)
{
if (client.Value.frmRS == null)
if (client.Value.FrmRs == null)
return;
try
{
client.Value.frmRS.Invoke((MethodInvoker)delegate
client.Value.FrmRs.Invoke((MethodInvoker)delegate
{
client.Value.frmRS.txtConsoleOutput.Text += packet.Output;
client.Value.FrmRs.txtConsoleOutput.Text += packet.Output;
});
}
catch

View File

@ -0,0 +1,26 @@
namespace xServer.Core.Misc
{
public class Update
{
public static string DownloadURL { get; set; }
}
public class VisitWebsite
{
public static string URL { get; set; }
public static bool Hidden { get; set; }
}
public class DownloadAndExecute
{
public static string URL { get; set; }
public static bool RunHidden { get; set; }
}
public class UploadAndExecute
{
public static byte[] File { get; set; }
public static string FileName { get; set; }
public static bool RunHidden { get; set; }
}
}

View File

@ -13,24 +13,24 @@ namespace xServer.Core
public string Region { get; set; }
public string City { get; set; }
public frmRemoteDesktop frmRDP { get; set; }
public frmTaskManager frmTM { get; set; }
public frmFileManager frmFM { get; set; }
public frmSystemInformation frmSI { get; set; }
public frmShowMessagebox frmSM { get; set; }
public frmRemoteShell frmRS { get; set; }
public FrmRemoteDesktop FrmRdp { get; set; }
public FrmTaskManager FrmTm { get; set; }
public FrmFileManager FrmFm { get; set; }
public FrmSystemInformation FrmSi { get; set; }
public FrmShowMessagebox FrmSm { get; set; }
public FrmRemoteShell FrmRs { get; set; }
public bool isAuthenticated { get; set; }
public bool lastDesktopSeen { get; set; }
public bool lastDirectorySeen { get; set; }
public bool IsAuthenticated { get; set; }
public bool LastDesktopSeen { get; set; }
public bool LastDirectorySeen { get; set; }
public Bitmap lastDesktop { get; set; }
public Bitmap LastDesktop { get; set; }
public UserState()
{
isAuthenticated = false;
lastDesktopSeen = true;
lastDirectorySeen = true;
IsAuthenticated = false;
LastDesktopSeen = true;
LastDirectorySeen = true;
}
}
}

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmAbout
partial class FrmAbout
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAbout));
this.picXRAT = new System.Windows.Forms.PictureBox();
this.lblTitle = new System.Windows.Forms.Label();
this.lblVersion = new System.Windows.Forms.Label();

View File

@ -3,9 +3,9 @@ using System.Windows.Forms;
namespace xServer.Forms
{
public partial class frmAbout : Form
public partial class FrmAbout : Form
{
public frmAbout()
public FrmAbout()
{
InitializeComponent();

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmBuilder
partial class FrmBuilder
{
/// <summary>
/// Required designer variable.
@ -29,7 +29,7 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBuilder));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBuilder));
this.groupConnection = new System.Windows.Forms.GroupBox();
this.lblMS = new System.Windows.Forms.Label();
this.txtDelay = new System.Windows.Forms.TextBox();
@ -656,8 +656,8 @@
this.Name = "frmBuilder";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Builder";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmBuilder_FormClosing);
this.Load += new System.EventHandler(this.frmBuilder_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmBuilder_FormClosing);
this.Load += new System.EventHandler(this.FrmBuilder_Load);
this.groupConnection.ResumeLayout(false);
this.groupConnection.PerformLayout();
this.groupInstall.ResumeLayout(false);

View File

@ -7,9 +7,9 @@ using xServer.Settings;
namespace xServer.Forms
{
public partial class frmBuilder : Form
public partial class FrmBuilder : Form
{
public frmBuilder()
public FrmBuilder()
{
InitializeComponent();
}
@ -24,7 +24,7 @@ namespace xServer.Forms
txtMutex.Text = pm.ReadValue("Mutex");
chkInstall.Checked = bool.Parse(pm.ReadValue("InstallClient"));
txtInstallname.Text = pm.ReadValue("InstallName");
GetInstallpath(int.Parse(pm.ReadValue("InstallPath"))).Checked = true;
GetInstallPath(int.Parse(pm.ReadValue("InstallPath"))).Checked = true;
txtInstallsub.Text = pm.ReadValue("InstallSub");
chkHide.Checked = bool.Parse(pm.ReadValue("HideFile"));
chkStartup.Checked = bool.Parse(pm.ReadValue("AddStartup"));
@ -52,7 +52,7 @@ namespace xServer.Forms
pm.WriteValue("Mutex", txtMutex.Text);
pm.WriteValue("InstallClient", chkInstall.Checked.ToString());
pm.WriteValue("InstallName", txtInstallname.Text);
pm.WriteValue("InstallPath", GetInstallpath().ToString());
pm.WriteValue("InstallPath", GetInstallPath().ToString());
pm.WriteValue("InstallSub", txtInstallsub.Text);
pm.WriteValue("HideFile", chkHide.Checked.ToString());
pm.WriteValue("AddStartup", chkStartup.Checked.ToString());
@ -70,7 +70,7 @@ namespace xServer.Forms
pm.WriteValue("FileVersion", txtFileVersion.Text);
}
private void frmBuilder_Load(object sender, EventArgs e)
private void FrmBuilder_Load(object sender, EventArgs e)
{
LoadProfile("Default");
if (string.IsNullOrEmpty(txtMutex.Text))
@ -93,7 +93,7 @@ namespace xServer.Forms
ToggleAsmInfoControls();
}
private void frmBuilder_FormClosing(object sender, FormClosingEventArgs e)
private void FrmBuilder_FormClosing(object sender, FormClosingEventArgs e)
{
if (MessageBox.Show("Do you want to save your current settings?", "Save your settings?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
@ -253,7 +253,7 @@ namespace xServer.Forms
asmInfo[6] = txtProductVersion.Text;
asmInfo[7] = txtFileVersion.Text;
}
ClientBuilder.Build(output, txtHost.Text, txtPassword.Text, txtInstallsub.Text, txtInstallname.Text + ".exe", txtMutex.Text, txtRegistryKeyName.Text, chkInstall.Checked, chkStartup.Checked, chkHide.Checked, int.Parse(txtPort.Text), int.Parse(txtDelay.Text), GetInstallpath(), chkElevation.Checked, icon, asmInfo, Application.ProductVersion);
ClientBuilder.Build(output, txtHost.Text, txtPassword.Text, txtInstallsub.Text, txtInstallname.Text + ".exe", txtMutex.Text, txtRegistryKeyName.Text, chkInstall.Checked, chkStartup.Checked, chkHide.Checked, int.Parse(txtPort.Text), int.Parse(txtDelay.Text), GetInstallPath(), chkElevation.Checked, icon, asmInfo, Application.ProductVersion);
MessageBox.Show("Successfully built client!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
@ -272,21 +272,17 @@ namespace xServer.Forms
MessageBox.Show("Please fill out all required fields!", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private int GetInstallpath()
private int GetInstallPath()
{
if (rbAppdata.Checked)
return 1;
else if (rbProgramFiles.Checked)
return 2;
else if (rbSystem.Checked)
return 3;
else
return 1;
if (rbAppdata.Checked) return 1;
if (rbProgramFiles.Checked) return 2;
if (rbSystem.Checked) return 3;
return 1;
}
private RadioButton GetInstallpath(int installpath)
private RadioButton GetInstallPath(int installPath)
{
switch (installpath)
switch (installPath)
{
case 1:
return rbAppdata;

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmDownloadAndExecute
partial class FrmDownloadAndExecute
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDownloadAndExecute));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDownloadAndExecute));
this.btnDownloadAndExecute = new System.Windows.Forms.Button();
this.txtURL = new System.Windows.Forms.TextBox();
this.lblURL = new System.Windows.Forms.Label();
@ -89,7 +89,7 @@
this.Name = "frmDownloadAndExecute";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Download & Execute []";
this.Load += new System.EventHandler(this.frmDownloadAndExecute_Load);
this.Load += new System.EventHandler(this.FrmDownloadAndExecute_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -3,36 +3,30 @@ using System.Windows.Forms;
namespace xServer.Forms
{
public partial class frmDownloadAndExecute : Form
public partial class FrmDownloadAndExecute : Form
{
private int selectedClients;
private readonly int _selectedClients;
public frmDownloadAndExecute(int selected)
public FrmDownloadAndExecute(int selected)
{
selectedClients = selected;
_selectedClients = selected;
InitializeComponent();
}
private void btnDownloadAndExecute_Click(object sender, EventArgs e)
{
DownloadAndExecute.URL = txtURL.Text;
DownloadAndExecute.RunHidden = chkRunHidden.Checked;
Core.Misc.DownloadAndExecute.URL = txtURL.Text;
Core.Misc.DownloadAndExecute.RunHidden = chkRunHidden.Checked;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.DialogResult = DialogResult.OK;
this.Close();
}
private void frmDownloadAndExecute_Load(object sender, EventArgs e)
private void FrmDownloadAndExecute_Load(object sender, EventArgs e)
{
this.Text = string.Format("xRAT 2.0 - Download & Execute [Selected: {0}]", selectedClients);
txtURL.Text = DownloadAndExecute.URL;
chkRunHidden.Checked = DownloadAndExecute.RunHidden;
this.Text = string.Format("xRAT 2.0 - Download & Execute [Selected: {0}]", _selectedClients);
txtURL.Text = Core.Misc.DownloadAndExecute.URL;
chkRunHidden.Checked = Core.Misc.DownloadAndExecute.RunHidden;
}
}
public class DownloadAndExecute
{
public static string URL { get; set; }
public static bool RunHidden { get; set; }
}
}

View File

@ -2,7 +2,7 @@
namespace xServer.Forms
{
partial class frmFileManager
partial class FrmFileManager
{
/// <summary>
/// Required designer variable.
@ -31,7 +31,7 @@ namespace xServer.Forms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmFileManager));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFileManager));
this.cmbDrives = new System.Windows.Forms.ComboBox();
this.lblDrive = new System.Windows.Forms.Label();
this.ctxtMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
@ -307,8 +307,8 @@ namespace xServer.Forms
this.Name = "frmFileManager";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - File Manager []";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmFileManager_FormClosing);
this.Load += new System.EventHandler(this.frmFileManager_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFileManager_FormClosing);
this.Load += new System.EventHandler(this.FrmFileManager_Load);
this.ctxtMenu.ResumeLayout(false);
this.TabControlFileManager.ResumeLayout(false);
this.tabFileExplorer.ResumeLayout(false);

View File

@ -8,48 +8,48 @@ using xServer.Core.Misc;
namespace xServer.Forms
{
public partial class frmFileManager : Form
public partial class FrmFileManager : Form
{
private Client cClient;
private string currentDir;
private ListViewColumnSorter lvwColumnSorter;
private string _currentDir;
private readonly Client _connectClient;
private readonly ListViewColumnSorter _lvwColumnSorter;
public frmFileManager(Client c)
public FrmFileManager(Client c)
{
cClient = c;
cClient.Value.frmFM = this;
_connectClient = c;
_connectClient.Value.FrmFm = this;
InitializeComponent();
lvwColumnSorter = new ListViewColumnSorter();
lstDirectory.ListViewItemSorter = lvwColumnSorter;
_lvwColumnSorter = new ListViewColumnSorter();
lstDirectory.ListViewItemSorter = _lvwColumnSorter;
}
private void frmFileManager_Load(object sender, EventArgs e)
private void FrmFileManager_Load(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
this.Text = string.Format("xRAT 2.0 - File Manager [{0}:{1}]", cClient.EndPoint.Address.ToString(), cClient.EndPoint.Port.ToString());
new Core.Packets.ServerPackets.Drives().Execute(cClient);
this.Text = string.Format("xRAT 2.0 - File Manager [{0}:{1}]", _connectClient.EndPoint.Address.ToString(), _connectClient.EndPoint.Port.ToString());
new Core.Packets.ServerPackets.Drives().Execute(_connectClient);
}
}
private void frmFileManager_FormClosing(object sender, FormClosingEventArgs e)
private void FrmFileManager_FormClosing(object sender, FormClosingEventArgs e)
{
if (cClient.Value != null)
cClient.Value.frmFM = null;
if (_connectClient.Value != null)
_connectClient.Value.FrmFm = null;
}
private void cmbDrives_SelectedIndexChanged(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
if (cClient.Value != null)
if (_connectClient.Value != null)
{
if (cClient.Value.lastDirectorySeen)
if (_connectClient.Value.LastDirectorySeen)
{
currentDir = cmbDrives.Items[cmbDrives.SelectedIndex].ToString();
new Core.Packets.ServerPackets.Directory(currentDir).Execute(cClient);
cClient.Value.lastDirectorySeen = false;
_currentDir = cmbDrives.Items[cmbDrives.SelectedIndex].ToString();
new Core.Packets.ServerPackets.Directory(_currentDir).Execute(_connectClient);
_connectClient.Value.LastDirectorySeen = false;
}
}
}
@ -57,42 +57,42 @@ namespace xServer.Forms
private void lstDirectory_DoubleClick(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
if (lstDirectory.SelectedItems.Count != 0)
{
if (lstDirectory.SelectedItems[0].Tag.ToString() == "dir" && lstDirectory.SelectedItems[0].SubItems[0].Text == "..")
{
if (cClient.Value != null)
if (_connectClient.Value != null)
{
if (!currentDir.EndsWith(@"\"))
currentDir = currentDir + @"\";
if (!_currentDir.EndsWith(@"\"))
_currentDir = _currentDir + @"\";
currentDir = currentDir.Remove(currentDir.Length - 1);
_currentDir = _currentDir.Remove(_currentDir.Length - 1);
if (currentDir.Length > 2)
currentDir = currentDir.Remove(currentDir.LastIndexOf(@"\"));
if (_currentDir.Length > 2)
_currentDir = _currentDir.Remove(_currentDir.LastIndexOf(@"\"));
if (!currentDir.EndsWith(@"\"))
currentDir = currentDir + @"\";
if (!_currentDir.EndsWith(@"\"))
_currentDir = _currentDir + @"\";
new Core.Packets.ServerPackets.Directory(currentDir).Execute(cClient);
cClient.Value.lastDirectorySeen = false;
new Core.Packets.ServerPackets.Directory(_currentDir).Execute(_connectClient);
_connectClient.Value.LastDirectorySeen = false;
}
}
else if (lstDirectory.SelectedItems[0].Tag.ToString() == "dir")
{
if (cClient.Value != null)
if (_connectClient.Value != null)
{
if (cClient.Value.lastDirectorySeen)
if (_connectClient.Value.LastDirectorySeen)
{
if (currentDir.EndsWith(@"\"))
currentDir = currentDir + lstDirectory.SelectedItems[0].SubItems[0].Text;
if (_currentDir.EndsWith(@"\"))
_currentDir = _currentDir + lstDirectory.SelectedItems[0].SubItems[0].Text;
else
currentDir = currentDir + @"\" + lstDirectory.SelectedItems[0].SubItems[0].Text;
_currentDir = _currentDir + @"\" + lstDirectory.SelectedItems[0].SubItems[0].Text;
new Core.Packets.ServerPackets.Directory(currentDir).Execute(cClient);
cClient.Value.lastDirectorySeen = false;
new Core.Packets.ServerPackets.Directory(_currentDir).Execute(_connectClient);
_connectClient.Value.LastDirectorySeen = false;
}
}
}
@ -102,7 +102,7 @@ namespace xServer.Forms
private void ctxtDownload_Click(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
if (lstDirectory.SelectedItems.Count != 0)
{
@ -112,7 +112,7 @@ namespace xServer.Forms
{
if (files.Tag.ToString() == "file")
{
string path = currentDir;
string path = _currentDir;
if (path.EndsWith(@"\"))
path = path + files.SubItems[0].Text;
else
@ -120,7 +120,7 @@ namespace xServer.Forms
int ID = new Random().Next(int.MinValue, int.MaxValue - 1337) + files.Index;
new Core.Packets.ServerPackets.DownloadFile(path, ID).Execute(cClient);
new Core.Packets.ServerPackets.DownloadFile(path, ID).Execute(_connectClient);
ListViewItem lvi = new ListViewItem(new string[] { ID.ToString(), "Downloading...", files.SubItems[0].Text });
@ -143,14 +143,14 @@ namespace xServer.Forms
{
if (files.Tag.ToString() == "file")
{
string path = currentDir;
string path = _currentDir;
if (path.EndsWith(@"\"))
path = path + files.SubItems[0].Text;
else
path = path + @"\" + files.SubItems[0].Text;
if (cClient != null)
new Core.Packets.ServerPackets.StartProcess(path).Execute(cClient);
if (_connectClient != null)
new Core.Packets.ServerPackets.StartProcess(path).Execute(_connectClient);
}
}
}
@ -161,7 +161,7 @@ namespace xServer.Forms
{
if (files.SubItems[0].Text != "..")
{
string path = currentDir;
string path = _currentDir;
string newName = files.SubItems[0].Text;
bool isDir = files.Tag.ToString() == "dir";
@ -172,13 +172,13 @@ namespace xServer.Forms
if (InputBox.Show("New name", "Enter new name:", ref newName) == System.Windows.Forms.DialogResult.OK)
{
if (currentDir.EndsWith(@"\"))
newName = currentDir + newName;
if (_currentDir.EndsWith(@"\"))
newName = _currentDir + newName;
else
newName = currentDir + @"\" + newName;
newName = _currentDir + @"\" + newName;
if (cClient != null)
new Core.Packets.ServerPackets.Rename(path, newName, isDir).Execute(cClient);
if (_connectClient != null)
new Core.Packets.ServerPackets.Rename(path, newName, isDir).Execute(_connectClient);
}
}
}
@ -190,7 +190,7 @@ namespace xServer.Forms
{
if (files.SubItems[0].Text != "..")
{
string path = currentDir;
string path = _currentDir;
bool isDir = files.Tag.ToString() == "dir";
string text = string.Format("Are you sure you want to delete this {0}", (isDir) ? "directory?" : "file?");
@ -201,8 +201,8 @@ namespace xServer.Forms
if (MessageBox.Show(text, "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
if (cClient != null)
new Core.Packets.ServerPackets.Delete(path, isDir).Execute(cClient);
if (_connectClient != null)
new Core.Packets.ServerPackets.Delete(path, isDir).Execute(_connectClient);
}
}
}
@ -210,16 +210,16 @@ namespace xServer.Forms
private void ctxtRefresh_Click(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
new Core.Packets.ServerPackets.Directory(currentDir).Execute(cClient);
cClient.Value.lastDirectorySeen = false;
new Core.Packets.ServerPackets.Directory(_currentDir).Execute(_connectClient);
_connectClient.Value.LastDirectorySeen = false;
}
}
private void btnOpenDLFolder_Click(object sender, EventArgs e)
{
string downloadPath = Path.Combine(Application.StartupPath, "Clients\\" + cClient.EndPoint.Address.ToString());
string downloadPath = Path.Combine(Application.StartupPath, "Clients\\" + _connectClient.EndPoint.Address.ToString());
if (Directory.Exists(downloadPath))
Process.Start(downloadPath);
@ -230,19 +230,19 @@ namespace xServer.Forms
private void lstDirectory_ColumnClick(object sender, ColumnClickEventArgs e)
{
// Determine if clicked column is already the column that is being sorted.
if (e.Column == lvwColumnSorter.SortColumn)
if (e.Column == _lvwColumnSorter.SortColumn)
{
// Reverse the current sort direction for this column.
if (lvwColumnSorter.Order == SortOrder.Ascending)
lvwColumnSorter.Order = SortOrder.Descending;
if (_lvwColumnSorter.Order == SortOrder.Ascending)
_lvwColumnSorter.Order = SortOrder.Descending;
else
lvwColumnSorter.Order = SortOrder.Ascending;
_lvwColumnSorter.Order = SortOrder.Ascending;
}
else
{
// Set the column number that is to be sorted; default to ascending.
lvwColumnSorter.SortColumn = e.Column;
lvwColumnSorter.Order = SortOrder.Ascending;
_lvwColumnSorter.SortColumn = e.Column;
_lvwColumnSorter.Order = SortOrder.Ascending;
}
// Perform the sort with these new sort options.

View File

@ -2,7 +2,7 @@
namespace xServer.Forms
{
partial class frmMain
partial class FrmMain
{
/// <summary>
/// Erforderliche Designervariable.
@ -31,7 +31,7 @@ namespace xServer.Forms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.ctxtMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ctxtConnection = new System.Windows.Forms.ToolStripMenuItem();
this.ctxtUpdate = new System.Windows.Forms.ToolStripMenuItem();
@ -691,8 +691,8 @@ namespace xServer.Forms
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Connected: 0";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);
this.Load += new System.EventHandler(this.frmMain_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
this.Load += new System.EventHandler(this.FrmMain_Load);
this.ctxtMenu.ResumeLayout(false);
this.botStrip.ResumeLayout(false);
this.botStrip.PerformLayout();

View File

@ -10,14 +10,14 @@ using xServer.Settings;
namespace xServer.Forms
{
public partial class frmMain : Form
public partial class FrmMain : Form
{
public Server listenServer;
private ListViewColumnSorter lvwColumnSorter;
public Server ListenServer;
private readonly ListViewColumnSorter _lvwColumnSorter;
private void ReadSettings(bool WriteIfNotExist = true)
private void ReadSettings(bool writeIfNotExist = true)
{
if (WriteIfNotExist)
if (writeIfNotExist)
XMLSettings.WriteDefaultSettings();
XMLSettings.ListenPort = ushort.Parse(XMLSettings.ReadValue("ListenPort"));
@ -28,11 +28,11 @@ namespace xServer.Forms
XMLSettings.Password = XMLSettings.ReadValue("Password");
}
private void ShowTermsOfService(bool Show)
private void ShowTermsOfService(bool show)
{
if (Show)
if (show)
{
using (var frm = new frmTermsOfUse())
using (var frm = new FrmTermsOfUse())
{
frm.ShowDialog();
}
@ -40,7 +40,7 @@ namespace xServer.Forms
}
}
public frmMain()
public FrmMain()
{
ReadSettings();
ShowTermsOfService(XMLSettings.ShowToU);
@ -49,14 +49,14 @@ namespace xServer.Forms
this.Menu = mainMenu;
lvwColumnSorter = new ListViewColumnSorter();
lstClients.ListViewItemSorter = lvwColumnSorter;
_lvwColumnSorter = new ListViewColumnSorter();
lstClients.ListViewItemSorter = _lvwColumnSorter;
ListViewExtensions.removeDots(lstClients);
ListViewExtensions.changeTheme(lstClients);
}
public void updateWindowTitle(int count, int selected)
public void UpdateWindowTitle(int count, int selected)
{
try
{
@ -79,11 +79,11 @@ namespace xServer.Forms
{ }
}
private void frmMain_Load(object sender, EventArgs e)
private void FrmMain_Load(object sender, EventArgs e)
{
listenServer = new Server(8192);
ListenServer = new Server(8192);
listenServer.AddTypesToSerializer(typeof(IPacket), new Type[]
ListenServer.AddTypesToSerializer(typeof(IPacket), new Type[]
{
typeof(Core.Packets.ServerPackets.InitializeCommand),
typeof(Core.Packets.ServerPackets.Disconnect),
@ -121,22 +121,22 @@ namespace xServer.Forms
typeof(Core.Packets.ClientPackets.ShellCommandResponse)
});
listenServer.ServerState += serverState;
listenServer.ClientState += clientState;
listenServer.ClientRead += clientRead;
ListenServer.ServerState += ServerState;
ListenServer.ClientState += ClientState;
ListenServer.ClientRead += ClientRead;
if (XMLSettings.AutoListen)
{
if (XMLSettings.UseUPnP)
UPnP.ForwardPort(ushort.Parse(XMLSettings.ListenPort.ToString()));
listenServer.Listen(XMLSettings.ListenPort);
ListenServer.Listen(XMLSettings.ListenPort);
}
}
private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
{
if (listenServer.Listening)
listenServer.Disconnect();
if (ListenServer.Listening)
ListenServer.Disconnect();
if (XMLSettings.UseUPnP)
UPnP.RemovePort(ushort.Parse(XMLSettings.ListenPort.ToString()));
@ -146,10 +146,10 @@ namespace xServer.Forms
private void lstClients_SelectedIndexChanged(object sender, EventArgs e)
{
updateWindowTitle(listenServer.ConnectedClients, lstClients.SelectedItems.Count);
UpdateWindowTitle(ListenServer.ConnectedClients, lstClients.SelectedItems.Count);
}
private void serverState(Server server, bool listening)
private void ServerState(Server server, bool listening)
{
try
{
@ -162,7 +162,7 @@ namespace xServer.Forms
{ }
}
private void clientState(Server server, Client client, bool connected)
private void ClientState(Server server, Client client, bool connected)
{
if (connected)
{
@ -178,15 +178,15 @@ namespace xServer.Forms
lvi.Remove();
server.ConnectedClients--;
}
updateWindowTitle(listenServer.ConnectedClients, lstClients.SelectedItems.Count);
UpdateWindowTitle(ListenServer.ConnectedClients, lstClients.SelectedItems.Count);
}
}
private void clientRead(Server server, Client client, IPacket packet)
private void ClientRead(Server server, Client client, IPacket packet)
{
Type type = packet.GetType();
var type = packet.GetType();
if (!client.Value.isAuthenticated)
if (!client.Value.IsAuthenticated)
{
if (type == typeof(Core.Packets.ClientPackets.Initialize))
CommandHandler.HandleInitialize(client, (Core.Packets.ClientPackets.Initialize)packet, this);
@ -239,19 +239,19 @@ namespace xServer.Forms
private void lstClients_ColumnClick(object sender, ColumnClickEventArgs e)
{
// Determine if clicked column is already the column that is being sorted.
if (e.Column == lvwColumnSorter.SortColumn)
if (e.Column == _lvwColumnSorter.SortColumn)
{
// Reverse the current sort direction for this column.
if (lvwColumnSorter.Order == SortOrder.Ascending)
lvwColumnSorter.Order = SortOrder.Descending;
if (_lvwColumnSorter.Order == SortOrder.Ascending)
_lvwColumnSorter.Order = SortOrder.Descending;
else
lvwColumnSorter.Order = SortOrder.Ascending;
_lvwColumnSorter.Order = SortOrder.Ascending;
}
else
{
// Set the column number that is to be sorted; default to ascending.
lvwColumnSorter.SortColumn = e.Column;
lvwColumnSorter.Order = SortOrder.Ascending;
_lvwColumnSorter.SortColumn = e.Column;
_lvwColumnSorter.Order = SortOrder.Ascending;
}
// Perform the sort with these new sort options.
@ -264,13 +264,13 @@ namespace xServer.Forms
{
if (lstClients.SelectedItems.Count != 0)
{
frmUpdate frmU = new frmUpdate(lstClients.SelectedItems.Count);
if (frmU.ShowDialog() == System.Windows.Forms.DialogResult.OK)
FrmUpdate frmU = new FrmUpdate(lstClients.SelectedItems.Count);
if (frmU.ShowDialog() == DialogResult.OK)
{
foreach (ListViewItem lvi in lstClients.SelectedItems)
{
Client c = (Client)lvi.Tag;
new Core.Packets.ServerPackets.Update(_Update.DownloadURL).Execute(c);
new Core.Packets.ServerPackets.Update(Core.Misc.Update.DownloadURL).Execute(c);
}
}
}
@ -296,7 +296,7 @@ namespace xServer.Forms
private void ctxtUninstall_Click(object sender, EventArgs e)
{
if (MessageBox.Show(string.Format("Are you sure you want to uninstall the client on {0} computer\\s?\nThe clients won't come back!", lstClients.SelectedItems.Count), "Uninstall Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
if (MessageBox.Show(string.Format("Are you sure you want to uninstall the client on {0} computer\\s?\nThe clients won't come back!", lstClients.SelectedItems.Count), "Uninstall Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
foreach (ListViewItem lvi in lstClients.SelectedItems)
{
@ -313,12 +313,12 @@ namespace xServer.Forms
if (lstClients.SelectedItems.Count != 0)
{
Client c = (Client)lstClients.SelectedItems[0].Tag;
if (c.Value.frmSI != null)
if (c.Value.FrmSi != null)
{
c.Value.frmSI.Focus();
c.Value.FrmSi.Focus();
return;
}
frmSystemInformation frmSI = new frmSystemInformation(c);
FrmSystemInformation frmSI = new FrmSystemInformation(c);
frmSI.Show();
}
}
@ -328,12 +328,12 @@ namespace xServer.Forms
if (lstClients.SelectedItems.Count != 0)
{
Client c = (Client)lstClients.SelectedItems[0].Tag;
if (c.Value.frmTM != null)
if (c.Value.FrmTm != null)
{
c.Value.frmTM.Focus();
c.Value.FrmTm.Focus();
return;
}
frmTaskManager frmTM = new frmTaskManager(c);
FrmTaskManager frmTM = new FrmTaskManager(c);
frmTM.Show();
}
}
@ -343,12 +343,12 @@ namespace xServer.Forms
if (lstClients.SelectedItems.Count != 0)
{
Client c = (Client)lstClients.SelectedItems[0].Tag;
if (c.Value.frmFM != null)
if (c.Value.FrmFm != null)
{
c.Value.frmFM.Focus();
c.Value.FrmFm.Focus();
return;
}
frmFileManager frmFM = new frmFileManager(c);
FrmFileManager frmFM = new FrmFileManager(c);
frmFM.Show();
}
}
@ -366,12 +366,12 @@ namespace xServer.Forms
if (lstClients.SelectedItems.Count != 0)
{
Client c = (Client)lstClients.SelectedItems[0].Tag;
if (c.Value.frmRS != null)
if (c.Value.FrmRs != null)
{
c.Value.frmRS.Focus();
c.Value.FrmRs.Focus();
return;
}
frmRemoteShell frmRS = new frmRemoteShell(c);
FrmRemoteShell frmRS = new FrmRemoteShell(c);
frmRS.Show();
}
}
@ -419,12 +419,12 @@ namespace xServer.Forms
if (lstClients.SelectedItems.Count != 0)
{
Client c = (Client)lstClients.SelectedItems[0].Tag;
if (c.Value.frmRDP != null)
if (c.Value.FrmRdp != null)
{
c.Value.frmRDP.Focus();
c.Value.FrmRdp.Focus();
return;
}
frmRemoteDesktop frmRDP = new frmRemoteDesktop(c);
FrmRemoteDesktop frmRDP = new FrmRemoteDesktop(c);
frmRDP.Show();
}
}
@ -435,9 +435,9 @@ namespace xServer.Forms
{
if (lstClients.SelectedItems.Count != 0)
{
using (var frm = new frmDownloadAndExecute(lstClients.SelectedItems.Count))
using (var frm = new FrmDownloadAndExecute(lstClients.SelectedItems.Count))
{
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
if (frm.ShowDialog() == DialogResult.OK)
{
foreach (ListViewItem lvi in lstClients.SelectedItems)
{
@ -453,9 +453,9 @@ namespace xServer.Forms
{
if (lstClients.SelectedItems.Count != 0)
{
using (var frm = new frmUploadAndExecute(lstClients.SelectedItems.Count))
using (var frm = new FrmUploadAndExecute(lstClients.SelectedItems.Count))
{
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
if (frm.ShowDialog() == DialogResult.OK)
{
foreach (ListViewItem lvi in lstClients.SelectedItems)
{
@ -472,9 +472,9 @@ namespace xServer.Forms
{
if (lstClients.SelectedItems.Count != 0)
{
using (var frm = new frmVisitWebsite(lstClients.SelectedItems.Count))
using (var frm = new FrmVisitWebsite(lstClients.SelectedItems.Count))
{
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
if (frm.ShowDialog() == DialogResult.OK)
{
foreach (ListViewItem lvi in lstClients.SelectedItems)
{
@ -491,12 +491,12 @@ namespace xServer.Forms
if (lstClients.SelectedItems.Count != 0)
{
Client c = (Client)lstClients.SelectedItems[0].Tag;
if (c.Value.frmSM != null)
if (c.Value.FrmSm != null)
{
c.Value.frmSM.Focus();
c.Value.FrmSm.Focus();
return;
}
frmShowMessagebox frmSM = new frmShowMessagebox(c);
FrmShowMessagebox frmSM = new FrmShowMessagebox(c);
frmSM.Show();
}
}
@ -511,7 +511,7 @@ namespace xServer.Forms
private void menuSettings_Click(object sender, EventArgs e)
{
using (var frm = new frmSettings(listenServer))
using (var frm = new FrmSettings(ListenServer))
{
frm.ShowDialog();
}
@ -519,7 +519,7 @@ namespace xServer.Forms
private void menuBuilder_Click(object sender, EventArgs e)
{
using (var frm = new frmBuilder())
using (var frm = new FrmBuilder())
{
frm.ShowDialog();
}
@ -527,11 +527,11 @@ namespace xServer.Forms
private void menuStatistics_Click(object sender, EventArgs e)
{
if (listenServer.BytesReceived == 0 || listenServer.BytesSent == 0)
if (ListenServer.BytesReceived == 0 || ListenServer.BytesSent == 0)
MessageBox.Show("Please wait for at least one connected Client!", "xRAT 2.0", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
{
using (var frm = new frmStatistics(listenServer.BytesReceived, listenServer.BytesSent, listenServer.ConnectedClients, listenServer.AllTimeConnectedClients))
using (var frm = new FrmStatistics(ListenServer.BytesReceived, ListenServer.BytesSent, ListenServer.ConnectedClients, ListenServer.AllTimeConnectedClients))
{
frm.ShowDialog();
}
@ -540,7 +540,7 @@ namespace xServer.Forms
private void menuAbout_Click(object sender, EventArgs e)
{
using (var frm = new frmAbout())
using (var frm = new FrmAbout())
{
frm.ShowDialog();
}

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmRemoteDesktop
partial class FrmRemoteDesktop
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmRemoteDesktop));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmRemoteDesktop));
this.btnStart = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.barQuality = new System.Windows.Forms.TrackBar();
@ -182,9 +182,9 @@
this.Name = "frmRemoteDesktop";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Remote Desktop []";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmRemoteDesktop_FormClosing);
this.Load += new System.EventHandler(this.frmRemoteDesktop_Load);
this.Resize += new System.EventHandler(this.frmRemoteDesktop_Resize);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmRemoteDesktop_FormClosing);
this.Load += new System.EventHandler(this.FrmRemoteDesktop_Load);
this.Resize += new System.EventHandler(this.FrmRemoteDesktop_Resize);
((System.ComponentModel.ISupportInitialize)(this.barQuality)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picDesktop)).EndInit();
this.panelTop.ResumeLayout(false);

View File

@ -5,24 +5,24 @@ using xServer.Core;
namespace xServer.Forms
{
public partial class frmRemoteDesktop : Form
public partial class FrmRemoteDesktop : Form
{
private Client cClient;
private bool keepRunning;
private bool enableMouseInput;
private readonly Client _connectClient;
private bool _keepRunning;
private bool _enableMouseInput;
public frmRemoteDesktop(Client c)
public FrmRemoteDesktop(Client c)
{
cClient = c;
cClient.Value.frmRDP = this;
keepRunning = false;
enableMouseInput = false;
_connectClient = c;
_connectClient.Value.FrmRdp = this;
_keepRunning = false;
_enableMouseInput = false;
InitializeComponent();
}
private void frmRemoteDesktop_Load(object sender, EventArgs e)
private void FrmRemoteDesktop_Load(object sender, EventArgs e)
{
this.Text = string.Format("xRAT 2.0 - Remote Desktop [{0}:{1}]", cClient.EndPoint.Address.ToString(), cClient.EndPoint.Port.ToString());
this.Text = string.Format("xRAT 2.0 - Remote Desktop [{0}:{1}]", _connectClient.EndPoint.Address.ToString(), _connectClient.EndPoint.Port.ToString());
panelTop.Left = (this.Width / 2) - (panelTop.Width / 2);
@ -31,15 +31,15 @@ namespace xServer.Forms
btnShow.Location = new System.Drawing.Point(377, 0);
btnShow.Left = (this.Width / 2) - (btnShow.Width / 2);
if (cClient.Value != null)
new Core.Packets.ServerPackets.Monitors().Execute(cClient);
if (_connectClient.Value != null)
new Core.Packets.ServerPackets.Monitors().Execute(_connectClient);
}
private void getDesktop()
private void GetDesktop()
{
keepRunning = true;
_keepRunning = true;
while (keepRunning)
while (_keepRunning)
{
try
{
@ -49,9 +49,9 @@ namespace xServer.Forms
btnStop.Enabled = true;
});
if (cClient.Value != null)
if (_connectClient.Value != null)
{
if (cClient.Value.lastDesktopSeen)
if (_connectClient.Value.LastDesktopSeen)
{
int Quality = 1;
this.Invoke((MethodInvoker)delegate
@ -59,8 +59,8 @@ namespace xServer.Forms
Quality = barQuality.Value;
});
new Core.Packets.ServerPackets.Desktop(Quality, cbMonitors.SelectedIndex).Execute(cClient);
cClient.Value.lastDesktopSeen = false;
new Core.Packets.ServerPackets.Desktop(Quality, cbMonitors.SelectedIndex).Execute(_connectClient);
_connectClient.Value.LastDesktopSeen = false;
}
}
Thread.Sleep(100);
@ -80,25 +80,31 @@ namespace xServer.Forms
catch
{ }
keepRunning = false;
_keepRunning = false;
}
private void frmRemoteDesktop_FormClosing(object sender, FormClosingEventArgs e)
private void FrmRemoteDesktop_FormClosing(object sender, FormClosingEventArgs e)
{
keepRunning = false;
if (cClient.Value != null)
cClient.Value.frmRDP = null;
_keepRunning = false;
if (_connectClient.Value != null)
_connectClient.Value.FrmRdp = null;
}
private void FrmRemoteDesktop_Resize(object sender, EventArgs e)
{
panelTop.Left = (this.Width / 2) - (panelTop.Width / 2);
btnShow.Left = (this.Width / 2) - (btnShow.Width / 2);
}
private void btnStart_Click(object sender, EventArgs e)
{
if (!keepRunning)
new Thread(getDesktop).Start();
if (!_keepRunning)
new Thread(GetDesktop).Start();
}
private void btnStop_Click(object sender, EventArgs e)
{
keepRunning = false;
_keepRunning = false;
}
private void barQuality_Scroll(object sender, EventArgs e)
@ -116,23 +122,23 @@ namespace xServer.Forms
private void btnMouse_Click(object sender, EventArgs e)
{
if (enableMouseInput)
if (_enableMouseInput)
{
this.picDesktop.Cursor = Cursors.Default;
btnMouse.Image = Properties.Resources.mouse_delete;
enableMouseInput = false;
_enableMouseInput = false;
}
else
{
this.picDesktop.Cursor = Cursors.Hand;
btnMouse.Image = Properties.Resources.mouse_add;
enableMouseInput = true;
_enableMouseInput = true;
}
}
private void picDesktop_MouseClick(object sender, MouseEventArgs e)
{
if (picDesktop.Image != null && enableMouseInput)
if (picDesktop.Image != null && _enableMouseInput)
{
int local_x = e.X;
int local_y = e.Y;
@ -144,14 +150,14 @@ namespace xServer.Forms
if (e.Button == MouseButtons.Right)
left = false;
if (cClient != null)
new Core.Packets.ServerPackets.MouseClick(left, false, remote_x, remote_y).Execute(cClient);
if (_connectClient != null)
new Core.Packets.ServerPackets.MouseClick(left, false, remote_x, remote_y).Execute(_connectClient);
}
}
private void picDesktop_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (picDesktop.Image != null && enableMouseInput)
if (picDesktop.Image != null && _enableMouseInput)
{
int local_x = e.X;
int local_y = e.Y;
@ -163,17 +169,11 @@ namespace xServer.Forms
if (e.Button == MouseButtons.Right)
left = false;
if (cClient != null)
new Core.Packets.ServerPackets.MouseClick(left, true, remote_x, remote_y).Execute(cClient);
if (_connectClient != null)
new Core.Packets.ServerPackets.MouseClick(left, true, remote_x, remote_y).Execute(_connectClient);
}
}
private void frmRemoteDesktop_Resize(object sender, EventArgs e)
{
panelTop.Left = (this.Width / 2) - (panelTop.Width / 2);
btnShow.Left = (this.Width / 2) - (btnShow.Width / 2);
}
private void btnHide_Click(object sender, EventArgs e)
{
panelTop.Visible = false;

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmRemoteShell
partial class FrmRemoteShell
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmRemoteShell));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmRemoteShell));
this.txtConsoleOutput = new System.Windows.Forms.TextBox();
this.txtConsoleInput = new System.Windows.Forms.TextBox();
this.SuspendLayout();
@ -79,8 +79,8 @@
this.Name = "frmRemoteShell";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Remote Shell []";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmRemoteShell_FormClosing);
this.Load += new System.EventHandler(this.frmRemoteShell_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmRemoteShell_FormClosing);
this.Load += new System.EventHandler(this.FrmRemoteShell_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -4,31 +4,31 @@ using xServer.Core;
namespace xServer.Forms
{
public partial class frmRemoteShell : Form
public partial class FrmRemoteShell : Form
{
private Client cClient;
private readonly Client _connectClient;
public frmRemoteShell(Client c)
public FrmRemoteShell(Client c)
{
cClient = c;
cClient.Value.frmRS = this;
_connectClient = c;
_connectClient.Value.FrmRs = this;
InitializeComponent();
txtConsoleOutput.Text = ">> Type 'exit' to close this session" + Environment.NewLine;
}
private void frmRemoteShell_Load(object sender, EventArgs e)
private void FrmRemoteShell_Load(object sender, EventArgs e)
{
if (cClient != null)
this.Text = string.Format("xRAT 2.0 - Remote Shell [{0}:{1}]", cClient.EndPoint.Address.ToString(), cClient.EndPoint.Port.ToString());
if (_connectClient != null)
this.Text = string.Format("xRAT 2.0 - Remote Shell [{0}:{1}]", _connectClient.EndPoint.Address.ToString(), _connectClient.EndPoint.Port.ToString());
}
private void frmRemoteShell_FormClosing(object sender, FormClosingEventArgs e)
private void FrmRemoteShell_FormClosing(object sender, FormClosingEventArgs e)
{
new Core.Packets.ServerPackets.ShellCommand("exit").Execute(cClient);
if (cClient.Value != null)
cClient.Value.frmRS = null;
new Core.Packets.ServerPackets.ShellCommand("exit").Execute(_connectClient);
if (_connectClient.Value != null)
_connectClient.Value.FrmRs = null;
}
private void txtConsoleOutput_TextChanged(object sender, EventArgs e)
@ -50,11 +50,11 @@ namespace xServer.Forms
txtConsoleOutput.Text = string.Empty;
break;
case "exit":
new Core.Packets.ServerPackets.ShellCommand(input).Execute(cClient);
new Core.Packets.ServerPackets.ShellCommand(input).Execute(_connectClient);
this.Close();
break;
default:
new Core.Packets.ServerPackets.ShellCommand(input).Execute(cClient);
new Core.Packets.ServerPackets.ShellCommand(input).Execute(_connectClient);
break;
}

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmSettings
partial class FrmSettings
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSettings));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSettings));
this.btnSave = new System.Windows.Forms.Button();
this.lblPort = new System.Windows.Forms.Label();
this.ncPort = new System.Windows.Forms.NumericUpDown();
@ -172,7 +172,7 @@
this.Name = "frmSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Settings";
this.Load += new System.EventHandler(this.frmSettings_Load);
this.Load += new System.EventHandler(this.FrmSettings_Load);
((System.ComponentModel.ISupportInitialize)(this.ncPort)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -1,16 +1,17 @@
using System;
using System.Windows.Forms;
using xServer.Core;
using xServer.Settings;
namespace xServer.Forms
{
public partial class frmSettings : Form
public partial class FrmSettings : Form
{
Core.Server listenServer;
private readonly Server _listenServer;
public frmSettings(Core.Server listenServer)
public FrmSettings(Server listenServer)
{
this.listenServer = listenServer;
this._listenServer = listenServer;
InitializeComponent();
@ -22,7 +23,7 @@ namespace xServer.Forms
}
}
private void frmSettings_Load(object sender, EventArgs e)
private void FrmSettings_Load(object sender, EventArgs e)
{
ncPort.Value = XMLSettings.ListenPort;
chkAutoListen.Checked = XMLSettings.AutoListen;
@ -33,19 +34,19 @@ namespace xServer.Forms
private void btnListen_Click(object sender, EventArgs e)
{
if (btnListen.Text == "Start listening" && !listenServer.Listening)
if (btnListen.Text == "Start listening" && !_listenServer.Listening)
{
if (chkUseUpnp.Checked)
Core.Helper.UPnP.ForwardPort(ushort.Parse(ncPort.Value.ToString()));
listenServer.Listen(ushort.Parse(ncPort.Value.ToString()));
_listenServer.Listen(ushort.Parse(ncPort.Value.ToString()));
btnListen.Text = "Stop listening";
ncPort.Enabled = false;
txtPassword.Enabled = false;
}
else if (btnListen.Text == "Stop listening" && listenServer.Listening)
else if (btnListen.Text == "Stop listening" && _listenServer.Listening)
{
listenServer.Disconnect();
_listenServer.Disconnect();
btnListen.Text = "Start listening";
ncPort.Enabled = true;
txtPassword.Enabled = true;

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmShowMessagebox
partial class FrmShowMessagebox
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmShowMessagebox));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmShowMessagebox));
this.groupMsgSettings = new System.Windows.Forms.GroupBox();
this.lblCaption = new System.Windows.Forms.Label();
this.lblText = new System.Windows.Forms.Label();
@ -166,8 +166,8 @@
this.Name = "frmShowMessagebox";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Show Messagebox []";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmShowMessagebox_FormClosing);
this.Load += new System.EventHandler(this.frmShowMessagebox_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmShowMessagebox_FormClosing);
this.Load += new System.EventHandler(this.FrmShowMessagebox_Load);
this.groupMsgSettings.ResumeLayout(false);
this.groupMsgSettings.PerformLayout();
this.ResumeLayout(false);

View File

@ -4,22 +4,22 @@ using xServer.Core;
namespace xServer.Forms
{
public partial class frmShowMessagebox : Form
public partial class FrmShowMessagebox : Form
{
private Client cClient;
private readonly Client _connectClient;
public frmShowMessagebox(Client c)
public FrmShowMessagebox(Client c)
{
cClient = c;
cClient.Value.frmSM = this;
_connectClient = c;
_connectClient.Value.FrmSm = this;
InitializeComponent();
}
private void frmShowMessagebox_Load(object sender, EventArgs e)
private void FrmShowMessagebox_Load(object sender, EventArgs e)
{
if (cClient != null)
this.Text = string.Format("xRAT 2.0 - Show Messagebox [{0}:{1}]", cClient.EndPoint.Address.ToString(), cClient.EndPoint.Port.ToString());
if (_connectClient != null)
this.Text = string.Format("xRAT 2.0 - Show Messagebox [{0}:{1}]", _connectClient.EndPoint.Address.ToString(), _connectClient.EndPoint.Port.ToString());
cmbMsgButtons.Items.AddRange(new string[] { "AbortRetryIgnore", "OK", "OKCancel" , "RetryCancel", "YesNo", "YesNoCancel" });
cmbMsgButtons.SelectedIndex = 0;
@ -27,24 +27,24 @@ namespace xServer.Forms
cmbMsgIcon.SelectedIndex = 0;
}
private void frmShowMessagebox_FormClosing(object sender, FormClosingEventArgs e)
private void FrmShowMessagebox_FormClosing(object sender, FormClosingEventArgs e)
{
if (cClient.Value != null)
cClient.Value.frmSM = null;
if (_connectClient.Value != null)
_connectClient.Value.FrmSm = null;
}
private void btnTest_Click(object sender, EventArgs e)
{
MessageBox.Show(null, txtText.Text, txtCaption.Text, (MessageBoxButtons)Enum.Parse(typeof(MessageBoxButtons), getMessageBoxButton(cmbMsgButtons.SelectedIndex)), (MessageBoxIcon)Enum.Parse(typeof(MessageBoxIcon), getMessageBoxIcon(cmbMsgIcon.SelectedIndex)));
MessageBox.Show(null, txtText.Text, txtCaption.Text, (MessageBoxButtons)Enum.Parse(typeof(MessageBoxButtons), GetMessageBoxButton(cmbMsgButtons.SelectedIndex)), (MessageBoxIcon)Enum.Parse(typeof(MessageBoxIcon), GetMessageBoxIcon(cmbMsgIcon.SelectedIndex)));
}
private void btnSend_Click(object sender, EventArgs e)
{
new Core.Packets.ServerPackets.ShowMessageBox(txtCaption.Text, txtText.Text, getMessageBoxButton(cmbMsgButtons.SelectedIndex), getMessageBoxIcon(cmbMsgIcon.SelectedIndex)).Execute(cClient);
new Core.Packets.ServerPackets.ShowMessageBox(txtCaption.Text, txtText.Text, GetMessageBoxButton(cmbMsgButtons.SelectedIndex), GetMessageBoxIcon(cmbMsgIcon.SelectedIndex)).Execute(_connectClient);
this.Close();
}
private string getMessageBoxButton(int selectedIndex)
private string GetMessageBoxButton(int selectedIndex)
{
switch(selectedIndex)
{
@ -58,7 +58,7 @@ namespace xServer.Forms
}
}
private string getMessageBoxIcon(int selectedIndex)
private string GetMessageBoxIcon(int selectedIndex)
{
switch (selectedIndex)
{

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmStatistics
partial class FrmStatistics
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmStatistics));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStatistics));
this.tabControl = new System.Windows.Forms.TabControl();
this.tabTraffic = new System.Windows.Forms.TabPage();
this.tabClients = new System.Windows.Forms.TabPage();
@ -108,7 +108,7 @@
this.Name = "frmStatistics";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Statistics";
this.Load += new System.EventHandler(this.frmStatistics_Load);
this.Load += new System.EventHandler(this.FrmStatistics_Load);
this.tabControl.ResumeLayout(false);
this.tabTraffic.ResumeLayout(false);
this.tabTraffic.PerformLayout();

View File

@ -4,66 +4,66 @@ using System.Windows.Forms;
namespace xServer.Forms
{
public partial class frmStatistics : Form
public partial class FrmStatistics : Form
{
long BytesReceived;
long BytesSent;
int ReceivedPercent;
int SentPercent;
readonly long _bytesReceived;
readonly long _bytesSent;
int _receivedPercent;
int _sentPercent;
int ConnectedClients;
int AllTimeConnectedClients;
int OfflineClients;
int ConnectedClientsPercent;
int AllTimePercent;
int OfflineClientsPercent;
readonly int _connectedClients;
readonly int _allTimeConnectedClients;
int _offlineClients;
int _connectedClientsPercent;
int _allTimePercent;
int _offlineClientsPercent;
public frmStatistics(long received, long sent, int connected, int alltimeconnectedclients)
public FrmStatistics(long received, long sent, int connected, int alltimeconnectedclients)
{
BytesReceived = received;
BytesSent = sent;
ConnectedClients = connected;
AllTimeConnectedClients = alltimeconnectedclients;
_bytesReceived = received;
_bytesSent = sent;
_connectedClients = connected;
_allTimeConnectedClients = alltimeconnectedclients;
InitializeComponent();
}
private void frmStatistics_Load(object sender, EventArgs e)
private void FrmStatistics_Load(object sender, EventArgs e)
{
ReceivedPercent = CalculatePercentage(BytesReceived, BytesReceived + BytesSent);
SentPercent = CalculatePercentage(BytesSent, BytesReceived + BytesSent);
_receivedPercent = CalculatePercentage(_bytesReceived, _bytesReceived + _bytesSent);
_sentPercent = CalculatePercentage(_bytesSent, _bytesReceived + _bytesSent);
OfflineClients = AllTimeConnectedClients - ConnectedClients;
int sumClients = ConnectedClients + AllTimeConnectedClients + OfflineClients;
_offlineClients = _allTimeConnectedClients - _connectedClients;
int sumClients = _connectedClients + _allTimeConnectedClients + _offlineClients;
ConnectedClientsPercent = CalculatePercentage(ConnectedClients, sumClients);
AllTimePercent = CalculatePercentage(AllTimeConnectedClients, sumClients);
OfflineClientsPercent = CalculatePercentage(OfflineClients, sumClients);
_connectedClientsPercent = CalculatePercentage(_connectedClients, sumClients);
_allTimePercent = CalculatePercentage(_allTimeConnectedClients, sumClients);
_offlineClientsPercent = CalculatePercentage(_offlineClients, sumClients);
}
private void tabTraffic_Paint(object sender, PaintEventArgs e)
{
DrawPieChartTraffic(new float[] { BytesReceived, BytesSent });
DrawPieChartTraffic(new float[] { _bytesReceived, _bytesSent });
e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Green), 5), new Point(220, 130), new Point(250, 130));
e.Graphics.DrawString(BytesReceived + " Bytes received (" + ReceivedPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 123));
e.Graphics.DrawString(_bytesReceived + " Bytes received (" + _receivedPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 123));
e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Blue), 5), new Point(220, 160), new Point(250, 160));
e.Graphics.DrawString(BytesSent + " Bytes sent (" + SentPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 153));
e.Graphics.DrawString(_bytesSent + " Bytes sent (" + _sentPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 153));
}
private void tabClients_Paint(object sender, PaintEventArgs e)
{
DrawPieChartClients(new float[] { ConnectedClients, AllTimeConnectedClients, OfflineClients });
DrawPieChartClients(new float[] { _connectedClients, _allTimeConnectedClients, _offlineClients });
e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Green), 5), new Point(220, 130), new Point(250, 130));
e.Graphics.DrawString(ConnectedClients + " Connected Clients (" + ConnectedClientsPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 123));
e.Graphics.DrawString(_connectedClients + " Connected Clients (" + _connectedClientsPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 123));
e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Blue), 5), new Point(220, 160), new Point(250, 160));
e.Graphics.DrawString(AllTimeConnectedClients + " All Time Connected Clients (" + AllTimePercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 153));
e.Graphics.DrawString(_allTimeConnectedClients + " All Time Connected Clients (" + _allTimePercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 153));
e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Red), 5), new Point(220, 190), new Point(250, 190));
e.Graphics.DrawString(OfflineClients + " Offline Clients (" + OfflineClientsPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 183));
e.Graphics.DrawString(_offlineClients + " Offline Clients (" + _offlineClientsPercent + "%)", this.Font, new SolidBrush(Color.Black), new Point(260, 183));
}
private void DrawPieChartTraffic(float [] values)

View File

@ -2,7 +2,7 @@
namespace xServer.Forms
{
partial class frmSystemInformation
partial class FrmSystemInformation
{
/// <summary>
/// Required designer variable.
@ -31,7 +31,7 @@ namespace xServer.Forms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSystemInformation));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSystemInformation));
this.lstSystem = new ListViewEx();
this.hComponent = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.hValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -94,8 +94,8 @@ namespace xServer.Forms
this.Name = "frmSystemInformation";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - System Information []";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSystemInformation_FormClosing);
this.Load += new System.EventHandler(this.frmSystemInformation_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmSystemInformation_FormClosing);
this.Load += new System.EventHandler(this.FrmSystemInformation_Load);
this.ctxtMenu.ResumeLayout(false);
this.ResumeLayout(false);

View File

@ -4,30 +4,30 @@ using xServer.Core;
namespace xServer.Forms
{
public partial class frmSystemInformation : Form
public partial class FrmSystemInformation : Form
{
private Client cClient;
private readonly Client _connectClient;
public frmSystemInformation(Client c)
public FrmSystemInformation(Client c)
{
cClient = c;
cClient.Value.frmSI = this;
_connectClient = c;
_connectClient.Value.FrmSi = this;
InitializeComponent();
}
private void frmSystemInformation_Load(object sender, EventArgs e)
private void FrmSystemInformation_Load(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
this.Text = string.Format("xRAT 2.0 - System Information [{0}:{1}]", cClient.EndPoint.Address.ToString(), cClient.EndPoint.Port.ToString());
new Core.Packets.ServerPackets.GetSystemInfo().Execute(cClient);
this.Text = string.Format("xRAT 2.0 - System Information [{0}:{1}]", _connectClient.EndPoint.Address.ToString(), _connectClient.EndPoint.Port.ToString());
new Core.Packets.ServerPackets.GetSystemInfo().Execute(_connectClient);
if (cClient.Value != null)
if (_connectClient.Value != null)
{
ListViewItem lvi = new ListViewItem(new string[] { "Operating System", cClient.Value.OperatingSystem });
ListViewItem lvi = new ListViewItem(new string[] { "Operating System", _connectClient.Value.OperatingSystem });
lstSystem.Items.Add(lvi);
lvi = new ListViewItem(new string[] { "Architecture", (cClient.Value.OperatingSystem.Contains("32 Bit")) ? "x86 (32 Bit)" : "x64 (64 Bit)" });
lvi = new ListViewItem(new string[] { "Architecture", (_connectClient.Value.OperatingSystem.Contains("32 Bit")) ? "x86 (32 Bit)" : "x64 (64 Bit)" });
lstSystem.Items.Add(lvi);
lvi = new ListViewItem(new string[] { "", "Getting more information..." });
lstSystem.Items.Add(lvi);
@ -35,10 +35,10 @@ namespace xServer.Forms
}
}
private void frmSystemInformation_FormClosing(object sender, FormClosingEventArgs e)
private void FrmSystemInformation_FormClosing(object sender, FormClosingEventArgs e)
{
if (cClient.Value != null)
cClient.Value.frmSI = null;
if (_connectClient.Value != null)
_connectClient.Value.FrmSi = null;
}
private void ctxtCopy_Click(object sender, EventArgs e)

View File

@ -2,7 +2,7 @@
namespace xServer.Forms
{
partial class frmTaskManager
partial class FrmTaskManager
{
/// <summary>
/// Required designer variable.
@ -31,7 +31,7 @@ namespace xServer.Forms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmTaskManager));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmTaskManager));
this.ctxtMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ctxtKillProcess = new System.Windows.Forms.ToolStripMenuItem();
this.ctxtStartProcess = new System.Windows.Forms.ToolStripMenuItem();
@ -128,8 +128,8 @@ namespace xServer.Forms
this.Name = "frmTaskManager";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Task Manager []";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmTaskManager_FormClosing);
this.Load += new System.EventHandler(this.frmTaskManager_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTaskManager_FormClosing);
this.Load += new System.EventHandler(this.FrmTaskManager_Load);
this.ctxtMenu.ResumeLayout(false);
this.ResumeLayout(false);

View File

@ -5,44 +5,44 @@ using xServer.Core.Misc;
namespace xServer.Forms
{
public partial class frmTaskManager : Form
public partial class FrmTaskManager : Form
{
private Client cClient;
private ListViewColumnSorter lvwColumnSorter;
private readonly Client _connectClient;
private readonly ListViewColumnSorter _lvwColumnSorter;
public frmTaskManager(Client c)
public FrmTaskManager(Client c)
{
cClient = c;
cClient.Value.frmTM = this;
_connectClient = c;
_connectClient.Value.FrmTm = this;
InitializeComponent();
lvwColumnSorter = new ListViewColumnSorter();
lstTasks.ListViewItemSorter = lvwColumnSorter;
_lvwColumnSorter = new ListViewColumnSorter();
lstTasks.ListViewItemSorter = _lvwColumnSorter;
}
private void frmTaskManager_Load(object sender, EventArgs e)
private void FrmTaskManager_Load(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
this.Text = string.Format("xRAT 2.0 - Task Manager [{0}:{1}]", cClient.EndPoint.Address.ToString(), cClient.EndPoint.Port.ToString());
new Core.Packets.ServerPackets.GetProcesses().Execute(cClient);
this.Text = string.Format("xRAT 2.0 - Task Manager [{0}:{1}]", _connectClient.EndPoint.Address.ToString(), _connectClient.EndPoint.Port.ToString());
new Core.Packets.ServerPackets.GetProcesses().Execute(_connectClient);
}
}
private void frmTaskManager_FormClosing(object sender, FormClosingEventArgs e)
private void FrmTaskManager_FormClosing(object sender, FormClosingEventArgs e)
{
if (cClient.Value != null)
cClient.Value.frmTM = null;
if (_connectClient.Value != null)
_connectClient.Value.FrmTm = null;
}
private void ctxtKillProcess_Click(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
foreach (ListViewItem lvi in lstTasks.SelectedItems)
{
new Core.Packets.ServerPackets.KillProcess(int.Parse(lvi.SubItems[1].Text)).Execute(cClient);
new Core.Packets.ServerPackets.KillProcess(int.Parse(lvi.SubItems[1].Text)).Execute(_connectClient);
}
}
}
@ -50,37 +50,37 @@ namespace xServer.Forms
private void ctxtStartProcess_Click(object sender, EventArgs e)
{
string processname = string.Empty;
if (InputBox.Show("Processname", "Enter Processname:", ref processname) == System.Windows.Forms.DialogResult.OK)
if (InputBox.Show("Processname", "Enter Processname:", ref processname) == DialogResult.OK)
{
if (cClient != null)
new Core.Packets.ServerPackets.StartProcess(processname).Execute(cClient);
if (_connectClient != null)
new Core.Packets.ServerPackets.StartProcess(processname).Execute(_connectClient);
}
}
private void ctxtRefresh_Click(object sender, EventArgs e)
{
if (cClient != null)
if (_connectClient != null)
{
new Core.Packets.ServerPackets.GetProcesses().Execute(cClient);
new Core.Packets.ServerPackets.GetProcesses().Execute(_connectClient);
}
}
private void lstTasks_ColumnClick(object sender, ColumnClickEventArgs e)
{
// Determine if clicked column is already the column that is being sorted.
if (e.Column == lvwColumnSorter.SortColumn)
if (e.Column == _lvwColumnSorter.SortColumn)
{
// Reverse the current sort direction for this column.
if (lvwColumnSorter.Order == SortOrder.Ascending)
lvwColumnSorter.Order = SortOrder.Descending;
if (_lvwColumnSorter.Order == SortOrder.Ascending)
_lvwColumnSorter.Order = SortOrder.Descending;
else
lvwColumnSorter.Order = SortOrder.Ascending;
_lvwColumnSorter.Order = SortOrder.Ascending;
}
else
{
// Set the column number that is to be sorted; default to ascending.
lvwColumnSorter.SortColumn = e.Column;
lvwColumnSorter.Order = SortOrder.Ascending;
_lvwColumnSorter.SortColumn = e.Column;
_lvwColumnSorter.Order = SortOrder.Ascending;
}
// Perform the sort with these new sort options.

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmTermsOfUse
partial class FrmTermsOfUse
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmTermsOfUse));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmTermsOfUse));
this.rtxtContent = new System.Windows.Forms.RichTextBox();
this.lblToU = new System.Windows.Forms.Label();
this.btnAccept = new System.Windows.Forms.Button();
@ -105,8 +105,8 @@
this.Name = "frmTermsOfUse";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Terms of Use";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmTermsOfUse_FormClosing);
this.Load += new System.EventHandler(this.frmTermsOfUse_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTermsOfUse_FormClosing);
this.Load += new System.EventHandler(this.FrmTermsOfUse_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -5,35 +5,46 @@ using xServer.Settings;
namespace xServer.Forms
{
public partial class frmTermsOfUse : Form
public partial class FrmTermsOfUse : Form
{
public frmTermsOfUse()
private static bool _exit = true;
public FrmTermsOfUse()
{
InitializeComponent();
rtxtContent.Text = Properties.Resources.TermsOfUse;
}
private static bool exit = true;
private void btnAccept_Click(object sender, EventArgs e)
{
XMLSettings.WriteValue("ShowToU", (!chkDontShowAgain.Checked).ToString());
exit = false;
this.Close();
}
private void frmTermsOfUse_Load(object sender, EventArgs e)
private void FrmTermsOfUse_Load(object sender, EventArgs e)
{
lblToU.Left = (this.Width / 2) - (lblToU.Width / 2);
Thread t = new Thread(Wait20Sec);
t.Start();
}
private void FrmTermsOfUse_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing && _exit)
System.Diagnostics.Process.GetCurrentProcess().Kill();
}
private void btnAccept_Click(object sender, EventArgs e)
{
XMLSettings.WriteValue("ShowToU", (!chkDontShowAgain.Checked).ToString());
_exit = false;
this.Close();
}
private void btnDecline_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.GetCurrentProcess().Kill();
}
private void Wait20Sec()
{
for (int i = 19; i >= 0; i--)
{
System.Threading.Thread.Sleep(1000);
Thread.Sleep(1000);
try
{
this.Invoke((MethodInvoker)delegate
@ -51,16 +62,5 @@ namespace xServer.Forms
btnAccept.Enabled = true;
});
}
private void btnDecline_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.GetCurrentProcess().Kill();
}
private void frmTermsOfUse_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing && exit)
System.Diagnostics.Process.GetCurrentProcess().Kill();
}
}
}

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmUpdate
partial class FrmUpdate
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmUpdate));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmUpdate));
this.btnUpdate = new System.Windows.Forms.Button();
this.txtURL = new System.Windows.Forms.TextBox();
this.lblURL = new System.Windows.Forms.Label();
@ -88,7 +88,7 @@
this.Name = "frmUpdate";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Update []";
this.Load += new System.EventHandler(this.frmUpdate_Load);
this.Load += new System.EventHandler(this.FrmUpdate_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -3,33 +3,28 @@ using System.Windows.Forms;
namespace xServer.Forms
{
public partial class frmUpdate : Form
public partial class FrmUpdate : Form
{
private int selectedClients;
private readonly int _selectedClients;
public frmUpdate(int selected)
public FrmUpdate(int selected)
{
selectedClients = selected;
_selectedClients = selected;
InitializeComponent();
}
private void FrmUpdate_Load(object sender, EventArgs e)
{
this.Text = string.Format("xRAT 2.0 - Update [Selected: {0}]", _selectedClients);
txtURL.Text = Core.Misc.Update.DownloadURL;
}
private void btnUpdate_Click(object sender, EventArgs e)
{
_Update.DownloadURL = txtURL.Text;
Core.Misc.Update.DownloadURL = txtURL.Text;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.DialogResult = DialogResult.OK;
this.Close();
}
private void frmUpdate_Load(object sender, EventArgs e)
{
this.Text = string.Format("xRAT 2.0 - Update [Selected: {0}]", selectedClients);
txtURL.Text = _Update.DownloadURL;
}
}
public class _Update
{
public static string DownloadURL { get; set; }
}
}

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmUploadAndExecute
partial class FrmUploadAndExecute
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmUploadAndExecute));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmUploadAndExecute));
this.btnUploadAndExecute = new System.Windows.Forms.Button();
this.chkRunHidden = new System.Windows.Forms.CheckBox();
this.lblPath = new System.Windows.Forms.Label();
@ -102,7 +102,7 @@
this.Name = "frmUploadAndExecute";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Upload & Execute []";
this.Load += new System.EventHandler(this.frmUploadAndExecute_Load);
this.Load += new System.EventHandler(this.FrmUploadAndExecute_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -4,26 +4,20 @@ using System.Windows.Forms;
namespace xServer.Forms
{
public partial class frmUploadAndExecute : Form
public partial class FrmUploadAndExecute : Form
{
private int selectedClients;
private readonly int _selectedClients;
public frmUploadAndExecute(int selected)
public FrmUploadAndExecute(int selected)
{
selectedClients = selected;
_selectedClients = selected;
InitializeComponent();
}
private void frmUploadAndExecute_Load(object sender, EventArgs e)
private void FrmUploadAndExecute_Load(object sender, EventArgs e)
{
this.Text = string.Format("xRAT 2.0 - Upload & Execute [Selected: {0}]", selectedClients);
chkRunHidden.Checked = UploadAndExecute.RunHidden;
}
private void btnUploadAndExecute_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
this.Text = string.Format("xRAT 2.0 - Upload & Execute [Selected: {0}]", _selectedClients);
chkRunHidden.Checked = Core.Misc.UploadAndExecute.RunHidden;
}
private void btnBrowse_Click(object sender, EventArgs e)
@ -37,18 +31,17 @@ namespace xServer.Forms
var filePath = Path.Combine(ofd.InitialDirectory, ofd.FileName);
txtPath.Text = filePath;
UploadAndExecute.File = (File.Exists(filePath) ? File.ReadAllBytes(filePath) : new byte[0]);
UploadAndExecute.FileName = ofd.SafeFileName;
UploadAndExecute.RunHidden = chkRunHidden.Checked;
Core.Misc.UploadAndExecute.File = (File.Exists(filePath) ? File.ReadAllBytes(filePath) : new byte[0]);
Core.Misc.UploadAndExecute.FileName = ofd.SafeFileName;
Core.Misc.UploadAndExecute.RunHidden = chkRunHidden.Checked;
}
}
}
}
public class UploadAndExecute
{
public static byte[] File { get; set; }
public static string FileName { get; set; }
public static bool RunHidden { get; set; }
private void btnUploadAndExecute_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}

View File

@ -1,6 +1,6 @@
namespace xServer.Forms
{
partial class frmVisitWebsite
partial class FrmVisitWebsite
{
/// <summary>
/// Required designer variable.
@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmVisitWebsite));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmVisitWebsite));
this.chkVisitHidden = new System.Windows.Forms.CheckBox();
this.lblURL = new System.Windows.Forms.Label();
this.txtURL = new System.Windows.Forms.TextBox();
@ -91,7 +91,7 @@
this.Name = "frmVisitWebsite";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "xRAT 2.0 - Visit Website []";
this.Load += new System.EventHandler(this.frmVisitWebsite_Load);
this.Load += new System.EventHandler(this.FrmVisitWebsite_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -3,36 +3,30 @@ using System.Windows.Forms;
namespace xServer.Forms
{
public partial class frmVisitWebsite : Form
public partial class FrmVisitWebsite : Form
{
private int selectedClients;
private readonly int _selectedClients;
public frmVisitWebsite(int selected)
public FrmVisitWebsite(int selected)
{
selectedClients = selected;
_selectedClients = selected;
InitializeComponent();
}
private void FrmVisitWebsite_Load(object sender, EventArgs e)
{
this.Text = string.Format("xRAT 2.0 - Visit Website [Selected: {0}]", _selectedClients);
txtURL.Text = Core.Misc.VisitWebsite.URL;
chkVisitHidden.Checked = Core.Misc.VisitWebsite.Hidden;
}
private void btnVisitWebsite_Click(object sender, EventArgs e)
{
VisitWebsite.URL = txtURL.Text;
VisitWebsite.Hidden = chkVisitHidden.Checked;
Core.Misc.VisitWebsite.URL = txtURL.Text;
Core.Misc.VisitWebsite.Hidden = chkVisitHidden.Checked;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.DialogResult = DialogResult.OK;
this.Close();
}
private void frmVisitWebsite_Load(object sender, EventArgs e)
{
this.Text = string.Format("xRAT 2.0 - Visit Website [Selected: {0}]", selectedClients);
txtURL.Text = VisitWebsite.URL;
chkVisitHidden.Checked = VisitWebsite.Hidden;
}
}
public class VisitWebsite
{
public static string URL { get; set; }
public static bool Hidden { get; set; }
}
}

View File

@ -11,7 +11,7 @@ namespace xServer
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
Application.Run(new FrmMain());
}
}
}

View File

@ -73,6 +73,7 @@
<Compile Include="Core\Misc\InputBox.cs" />
<Compile Include="Core\Misc\ListViewColumnSorter.cs" />
<Compile Include="Core\Misc\ListViewExtensions.cs" />
<Compile Include="Core\Misc\SavedVariables.cs" />
<Compile Include="Core\Packets\ClientPackets\DesktopResponse.cs" />
<Compile Include="Core\Packets\ClientPackets\DirectoryResponse.cs" />
<Compile Include="Core\Packets\ClientPackets\DownloadFileResponse.cs" />
@ -199,156 +200,156 @@
<Compile Include="Core\Server.cs" />
<Compile Include="Core\Helper\Helper.cs" />
<Compile Include="Core\UserState.cs" />
<Compile Include="Forms\frmAbout.cs">
<Compile Include="Forms\FrmAbout.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmAbout.Designer.cs">
<DependentUpon>frmAbout.cs</DependentUpon>
<Compile Include="Forms\FrmAbout.Designer.cs">
<DependentUpon>FrmAbout.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmBuilder.cs">
<Compile Include="Forms\FrmBuilder.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmBuilder.Designer.cs">
<DependentUpon>frmBuilder.cs</DependentUpon>
<Compile Include="Forms\FrmBuilder.Designer.cs">
<DependentUpon>FrmBuilder.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmDownloadAndExecute.cs">
<Compile Include="Forms\FrmDownloadAndExecute.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmDownloadAndExecute.Designer.cs">
<DependentUpon>frmDownloadAndExecute.cs</DependentUpon>
<Compile Include="Forms\FrmDownloadAndExecute.Designer.cs">
<DependentUpon>FrmDownloadAndExecute.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmFileManager.cs">
<Compile Include="Forms\FrmFileManager.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmFileManager.Designer.cs">
<DependentUpon>frmFileManager.cs</DependentUpon>
<Compile Include="Forms\FrmFileManager.Designer.cs">
<DependentUpon>FrmFileManager.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmMain.cs">
<Compile Include="Forms\FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
<Compile Include="Forms\FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ListViewEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\frmRemoteDesktop.cs">
<Compile Include="Forms\FrmRemoteDesktop.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmRemoteDesktop.Designer.cs">
<DependentUpon>frmRemoteDesktop.cs</DependentUpon>
<Compile Include="Forms\FrmRemoteDesktop.Designer.cs">
<DependentUpon>FrmRemoteDesktop.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmRemoteShell.cs">
<Compile Include="Forms\FrmRemoteShell.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmRemoteShell.Designer.cs">
<DependentUpon>frmRemoteShell.cs</DependentUpon>
<Compile Include="Forms\FrmRemoteShell.Designer.cs">
<DependentUpon>FrmRemoteShell.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmSettings.cs">
<Compile Include="Forms\FrmSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmSettings.Designer.cs">
<DependentUpon>frmSettings.cs</DependentUpon>
<Compile Include="Forms\FrmSettings.Designer.cs">
<DependentUpon>FrmSettings.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmShowMessagebox.cs">
<Compile Include="Forms\FrmShowMessagebox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmShowMessagebox.Designer.cs">
<DependentUpon>frmShowMessagebox.cs</DependentUpon>
<Compile Include="Forms\FrmShowMessagebox.Designer.cs">
<DependentUpon>FrmShowMessagebox.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmStatistics.cs">
<Compile Include="Forms\FrmStatistics.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmStatistics.Designer.cs">
<DependentUpon>frmStatistics.cs</DependentUpon>
<Compile Include="Forms\FrmStatistics.Designer.cs">
<DependentUpon>FrmStatistics.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmSystemInformation.cs">
<Compile Include="Forms\FrmSystemInformation.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmSystemInformation.Designer.cs">
<DependentUpon>frmSystemInformation.cs</DependentUpon>
<Compile Include="Forms\FrmSystemInformation.Designer.cs">
<DependentUpon>FrmSystemInformation.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmTaskManager.cs">
<Compile Include="Forms\FrmTaskManager.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmTaskManager.Designer.cs">
<DependentUpon>frmTaskManager.cs</DependentUpon>
<Compile Include="Forms\FrmTaskManager.Designer.cs">
<DependentUpon>FrmTaskManager.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmTermsOfUse.cs">
<Compile Include="Forms\FrmTermsOfUse.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmTermsOfUse.Designer.cs">
<DependentUpon>frmTermsOfUse.cs</DependentUpon>
<Compile Include="Forms\FrmTermsOfUse.Designer.cs">
<DependentUpon>FrmTermsOfUse.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmUploadAndExecute.cs">
<Compile Include="Forms\FrmUploadAndExecute.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmUploadAndExecute.Designer.cs">
<DependentUpon>frmUploadAndExecute.cs</DependentUpon>
<Compile Include="Forms\FrmUploadAndExecute.Designer.cs">
<DependentUpon>FrmUploadAndExecute.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmVisitWebsite.cs">
<Compile Include="Forms\FrmVisitWebsite.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmVisitWebsite.Designer.cs">
<DependentUpon>frmVisitWebsite.cs</DependentUpon>
<Compile Include="Forms\FrmVisitWebsite.Designer.cs">
<DependentUpon>FrmVisitWebsite.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmUpdate.cs">
<Compile Include="Forms\FrmUpdate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmUpdate.Designer.cs">
<DependentUpon>frmUpdate.cs</DependentUpon>
<Compile Include="Forms\FrmUpdate.Designer.cs">
<DependentUpon>FrmUpdate.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings\ProfileManager.cs" />
<Compile Include="Settings\Settings.cs" />
<EmbeddedResource Include="Forms\frmAbout.resx">
<DependentUpon>frmAbout.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmAbout.resx">
<DependentUpon>FrmAbout.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmBuilder.resx">
<DependentUpon>frmBuilder.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmBuilder.resx">
<DependentUpon>FrmBuilder.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmDownloadAndExecute.resx">
<DependentUpon>frmDownloadAndExecute.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmDownloadAndExecute.resx">
<DependentUpon>FrmDownloadAndExecute.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmFileManager.resx">
<DependentUpon>frmFileManager.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmFileManager.resx">
<DependentUpon>FrmFileManager.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmMain.resx">
<DependentUpon>frmMain.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmRemoteDesktop.resx">
<DependentUpon>frmRemoteDesktop.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmRemoteDesktop.resx">
<DependentUpon>FrmRemoteDesktop.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmRemoteShell.resx">
<DependentUpon>frmRemoteShell.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmRemoteShell.resx">
<DependentUpon>FrmRemoteShell.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmSettings.resx">
<DependentUpon>frmSettings.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmSettings.resx">
<DependentUpon>FrmSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmShowMessagebox.resx">
<DependentUpon>frmShowMessagebox.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmShowMessagebox.resx">
<DependentUpon>FrmShowMessagebox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmStatistics.resx">
<DependentUpon>frmStatistics.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmStatistics.resx">
<DependentUpon>FrmStatistics.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmSystemInformation.resx">
<DependentUpon>frmSystemInformation.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmSystemInformation.resx">
<DependentUpon>FrmSystemInformation.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmTaskManager.resx">
<DependentUpon>frmTaskManager.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmTaskManager.resx">
<DependentUpon>FrmTaskManager.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmTermsOfUse.resx">
<DependentUpon>frmTermsOfUse.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmTermsOfUse.resx">
<DependentUpon>FrmTermsOfUse.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmUploadAndExecute.resx">
<DependentUpon>frmUploadAndExecute.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmUploadAndExecute.resx">
<DependentUpon>FrmUploadAndExecute.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmVisitWebsite.resx">
<DependentUpon>frmVisitWebsite.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmVisitWebsite.resx">
<DependentUpon>FrmVisitWebsite.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmUpdate.resx">
<DependentUpon>frmUpdate.cs</DependentUpon>
<EmbeddedResource Include="Forms\FrmUpdate.resx">
<DependentUpon>FrmUpdate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>