public ShellManager(ActionCenter.ActionCenterInternalEventHandler dispatchData) { this.DispatchData = dispatchData; this._cmdQueue = new Queue <byte[]>(); this._asyncQueue = new AsyncWorkerQueue(); this._neuroLog.Write("Initializing Shell Manager"); //this.LaunchShell(); }
public ShellManager(ActionCenter.ActionCenterInternalEventHandler dispatchData) { this.DispatchData = dispatchData; this._cmdQueue = new Queue<byte[]>(); this._asyncQueue = new AsyncWorkerQueue(); this._neuroLog.Write("Initializing Shell Manager"); //this.LaunchShell(); }
public ServerForm(int socket) : this() { this._paramSocket = socket; this._parentRecordDir = System.IO.Path.Combine(Application.StartupPath, "Recordings"); if(!System.IO.Directory.Exists(this._parentRecordDir)) System.IO.Directory.CreateDirectory(this._parentRecordDir); this._neuroLog.WriteFormat("Initialization", "Socket: {0}\nRecordings Path: {1}", this._paramSocket, this._parentRecordDir); //OvermindClientTab otab; //this.tabControl.TabPages.Add(otab=new OvermindClientTab(0, "NB", null, null)); //otab.OnDisconnectClicked += new OvermindClientTab.ClientEventHandler(otab_OnDisconnectClicked); /*otab.OnRecordChanged += new OvermindClientTab.ClientTabEventHandler(otab_OnRecordChanged); otab.KeyDown += new OvermindClientTab.ClientEventHandler(otab_KeyDown); otab.KeyPress += new OvermindClientTab.ClientEventHandler(otab_KeyPress); otab.KeyUp += new OvermindClientTab.ClientEventHandler(otab_KeyUp); otab.MouseClick += new OvermindClientTab.ClientEventHandler(otab_MouseClick); otab.MouseDoubleClick += new OvermindClientTab.ClientEventHandler(otab_MouseDoubleClick); otab.MouseDown += new OvermindClientTab.ClientEventHandler(otab_MouseDown); otab.MouseMove += new OvermindClientTab.ClientEventHandler(otab_MouseMove); otab.MouseUp += new OvermindClientTab.ClientEventHandler(otab_MouseUp); otab.MouseWheel += new OvermindClientTab.ClientEventHandler(otab_MouseWheel); */ this._captureRecorders = new Dictionary<int, CaptureRecorder>(); this._tabClientPageIndices = new Dictionary<int, OvermindClientTab>(); this._workerQueue = new AsyncWorkerQueue(); this._snapQueue = new Queue<TabImagePair>(); // Quantizer _quantizer = new OctreeQuantizer(256, 8); this._actionCenters = new Dictionary<int, ActionCenter>(); this._server = new TcpServer(); this._neuroLog.Write("Initializing TCP instance"); this._server.OnServerStart += new TcpServer.ServerStatusEventHandler(_server_OnServerStart); this._server.OnServerStop += new TcpServer.ServerStatusEventHandler(_server_OnServerStop); this._server.OnError += new TcpServer.ServerStatusEventHandler(_server_OnError); this._server.OnClientConnected += new TcpServer.ServerStatusEventHandler(_server_OnClientConnected); this._server.OnDataReceived += new TcpServer.ServerStatusEventHandler(_server_OnDataReceived); this._server.OnAcknowledged += new TcpServer.ServerStatusEventHandler(_server_OnAcknowledged); this._server.OnStatusChanged += new TcpServer.ServerStatusEventHandler(_server_OnStatusChanged); this._server.OnClientStatusChanged += new TcpServer.ServerClientStatusEventHandler(_server_OnClientStatusChanged); this._server.Start(this._paramSocket); /* Bitmap bmp = ScreenSnap.ScreenSnapshot(); //Bitmap bmp = (Bitmap)Image.FromFile("test.bmp", false); long l1 = DateTime.UtcNow.Ticks; ScreenSnap.FI_ConvertSave(bmp, 0.4f); System.Diagnostics.Trace.WriteLine("[FI]* : " + (new TimeSpan(DateTime.UtcNow.Ticks-l1)).TotalSeconds); NX.Imaging.OctreeQuantizer oq = new NX.Imaging.OctreeQuantizer(256, 8); //NX.Imaging.UniformQuantizer oq = new NX.Imaging.UniformQuantizer(); l1 = DateTime.UtcNow.Ticks; ScreenSnap.SnapshotToFile(oq.Quantize(ScreenSnap.ShrinkBitmap(bmp, 0.4f)), "test_z3.png"); System.Diagnostics.Trace.WriteLine("[OT]# : " + (new TimeSpan(DateTime.UtcNow.Ticks-l1)).TotalSeconds); //ScreenSnap.SnapshotToFile(bmp, "test_z2.png", 75, 0.4f); */ // END //this._server.WaitForClient(); }
public ServerForm(int socket) : this() { this._paramSocket = socket; this._parentRecordDir = System.IO.Path.Combine(Application.StartupPath, "Recordings"); if (!System.IO.Directory.Exists(this._parentRecordDir)) { System.IO.Directory.CreateDirectory(this._parentRecordDir); } this._neuroLog.WriteFormat("Initialization", "Socket: {0}\nRecordings Path: {1}", this._paramSocket, this._parentRecordDir); //OvermindClientTab otab; //this.tabControl.TabPages.Add(otab=new OvermindClientTab(0, "NB", null, null)); //otab.OnDisconnectClicked += new OvermindClientTab.ClientEventHandler(otab_OnDisconnectClicked); /*otab.OnRecordChanged += new OvermindClientTab.ClientTabEventHandler(otab_OnRecordChanged); * otab.KeyDown += new OvermindClientTab.ClientEventHandler(otab_KeyDown); * otab.KeyPress += new OvermindClientTab.ClientEventHandler(otab_KeyPress); * otab.KeyUp += new OvermindClientTab.ClientEventHandler(otab_KeyUp); * otab.MouseClick += new OvermindClientTab.ClientEventHandler(otab_MouseClick); * otab.MouseDoubleClick += new OvermindClientTab.ClientEventHandler(otab_MouseDoubleClick); * otab.MouseDown += new OvermindClientTab.ClientEventHandler(otab_MouseDown); * otab.MouseMove += new OvermindClientTab.ClientEventHandler(otab_MouseMove); * otab.MouseUp += new OvermindClientTab.ClientEventHandler(otab_MouseUp); * otab.MouseWheel += new OvermindClientTab.ClientEventHandler(otab_MouseWheel); */ this._captureRecorders = new Dictionary <int, CaptureRecorder>(); this._tabClientPageIndices = new Dictionary <int, OvermindClientTab>(); this._workerQueue = new AsyncWorkerQueue(); this._snapQueue = new Queue <TabImagePair>(); // Quantizer _quantizer = new OctreeQuantizer(256, 8); this._actionCenters = new Dictionary <int, ActionCenter>(); this._server = new TcpServer(); this._neuroLog.Write("Initializing TCP instance"); this._server.OnServerStart += new TcpServer.ServerStatusEventHandler(_server_OnServerStart); this._server.OnServerStop += new TcpServer.ServerStatusEventHandler(_server_OnServerStop); this._server.OnError += new TcpServer.ServerStatusEventHandler(_server_OnError); this._server.OnClientConnected += new TcpServer.ServerStatusEventHandler(_server_OnClientConnected); this._server.OnDataReceived += new TcpServer.ServerStatusEventHandler(_server_OnDataReceived); this._server.OnAcknowledged += new TcpServer.ServerStatusEventHandler(_server_OnAcknowledged); this._server.OnStatusChanged += new TcpServer.ServerStatusEventHandler(_server_OnStatusChanged); this._server.OnClientStatusChanged += new TcpServer.ServerClientStatusEventHandler(_server_OnClientStatusChanged); this._server.Start(this._paramSocket); /* * Bitmap bmp = ScreenSnap.ScreenSnapshot(); * //Bitmap bmp = (Bitmap)Image.FromFile("test.bmp", false); * long l1 = DateTime.UtcNow.Ticks; * ScreenSnap.FI_ConvertSave(bmp, 0.4f); * System.Diagnostics.Trace.WriteLine("[FI]* : " + (new TimeSpan(DateTime.UtcNow.Ticks-l1)).TotalSeconds); * NX.Imaging.OctreeQuantizer oq = new NX.Imaging.OctreeQuantizer(256, 8); * //NX.Imaging.UniformQuantizer oq = new NX.Imaging.UniformQuantizer(); * l1 = DateTime.UtcNow.Ticks; * ScreenSnap.SnapshotToFile(oq.Quantize(ScreenSnap.ShrinkBitmap(bmp, 0.4f)), "test_z3.png"); * System.Diagnostics.Trace.WriteLine("[OT]# : " + (new TimeSpan(DateTime.UtcNow.Ticks-l1)).TotalSeconds); * * //ScreenSnap.SnapshotToFile(bmp, "test_z2.png", 75, 0.4f); */ // END //this._server.WaitForClient(); }