mirror of https://github.com/quasar/Quasar.git
Minor changes, removed some spaces
This commit is contained in:
parent
21fc728d64
commit
9834d819d9
|
@ -166,10 +166,7 @@ private void Process(object s, SocketAsyncEventArgs e)
|
|||
Process(null, e);
|
||||
}
|
||||
else
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
@ -204,7 +201,6 @@ private void SendKeepAlives()
|
|||
}
|
||||
|
||||
}) { IsBackground = true }.Start();
|
||||
|
||||
}
|
||||
|
||||
private void KeepAliveCallback(object state)
|
||||
|
@ -216,7 +212,6 @@ private void KeepAliveCallback(object state)
|
|||
keepAlive.Client.Disconnect();
|
||||
_keepAlives.Remove(keepAlive);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal void HandleKeepAlivePacket(KeepAliveResponse packet, Client client)
|
||||
|
@ -262,6 +257,5 @@ private void HandleState(Client s, bool open)
|
|||
OnClientState(s, false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public frmMain()
|
|||
XMLSettings.AutoListen = bool.Parse(XMLSettings.ReadValue("AutoListen"));
|
||||
XMLSettings.ShowPopup = bool.Parse(XMLSettings.ReadValue("ShowPopup"));
|
||||
XMLSettings.Password = XMLSettings.ReadValue("Password");
|
||||
// fallback for old settings
|
||||
XMLSettings.UseUPnP = bool.Parse((!string.IsNullOrEmpty(XMLSettings.ReadValue("UseUPnP"))) ? XMLSettings.ReadValue("UseUPnP") : "False");
|
||||
|
||||
if (bool.Parse(XMLSettings.ReadValue("ShowToU")))
|
||||
|
@ -310,24 +311,6 @@ private void ctxtSystemInformation_Click(object sender, EventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
private void ctxtDownloadAndExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstClients.SelectedItems.Count != 0)
|
||||
{
|
||||
using (var frm = new frmDownloadAndExecute(lstClients.SelectedItems.Count))
|
||||
{
|
||||
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
foreach (ListViewItem lvi in lstClients.SelectedItems)
|
||||
{
|
||||
Client c = (Client)lvi.Tag;
|
||||
new Core.Packets.ServerPackets.DownloadAndExecute(DownloadAndExecute.URL, DownloadAndExecute.RunHidden).Execute(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ctxtTaskManager_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstClients.SelectedItems.Count != 0)
|
||||
|
@ -358,24 +341,6 @@ private void ctxtFileManager_Click(object sender, EventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
private void ctxtUploadAndExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstClients.SelectedItems.Count != 0)
|
||||
{
|
||||
using (var frm = new frmUploadAndExecute(lstClients.SelectedItems.Count))
|
||||
{
|
||||
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
foreach (ListViewItem lvi in lstClients.SelectedItems)
|
||||
{
|
||||
Client c = (Client)lvi.Tag;
|
||||
new Core.Packets.ServerPackets.UploadAndExecute(UploadAndExecute.File, UploadAndExecute.FileName, UploadAndExecute.RunHidden).Execute(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ctxtPasswordRecovery_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstClients.SelectedItems.Count != 0)
|
||||
|
@ -454,6 +419,42 @@ private void ctxtRemoteDesktop_Click(object sender, EventArgs e)
|
|||
#endregion
|
||||
|
||||
#region "Miscellaneous"
|
||||
private void ctxtDownloadAndExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstClients.SelectedItems.Count != 0)
|
||||
{
|
||||
using (var frm = new frmDownloadAndExecute(lstClients.SelectedItems.Count))
|
||||
{
|
||||
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
foreach (ListViewItem lvi in lstClients.SelectedItems)
|
||||
{
|
||||
Client c = (Client)lvi.Tag;
|
||||
new Core.Packets.ServerPackets.DownloadAndExecute(DownloadAndExecute.URL, DownloadAndExecute.RunHidden).Execute(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ctxtUploadAndExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstClients.SelectedItems.Count != 0)
|
||||
{
|
||||
using (var frm = new frmUploadAndExecute(lstClients.SelectedItems.Count))
|
||||
{
|
||||
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
foreach (ListViewItem lvi in lstClients.SelectedItems)
|
||||
{
|
||||
Client c = (Client)lvi.Tag;
|
||||
new Core.Packets.ServerPackets.UploadAndExecute(UploadAndExecute.File, UploadAndExecute.FileName, UploadAndExecute.RunHidden).Execute(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ctxtVisitWebsite_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstClients.SelectedItems.Count != 0)
|
||||
|
|
Loading…
Reference in New Issue