Ejemplo n.º 1
0
 /// <summary>
 /// Creates a string[] Container object containing computer
 /// Hardware usage
 /// </summary>
 /// <returns>String[] Data Container with Hardware Usage</returns>
 public Container SendHardwareUsage()
 {
     Console.WriteLine("Getting usage...");
     Container dataContainter = new Container(GetHardwareUsage());
     Console.WriteLine("Returning hardware usage");
     return dataContainter;
 }
Ejemplo n.º 2
0
        public static void SendTaskDetails(List<ScheduledTask> TaskList, TcpClient Socket)
        {
            Container dataContainer = new Container(TaskList);
            NetworkStream stream = Socket.GetStream();
            BinaryFormatter bf = new BinaryFormatter();
            MemoryStream ms = new MemoryStream();

            bf.Serialize(ms, dataContainer);
            byte[] buffer = ms.ToArray();
            System.Threading.Thread.Sleep(500);
            Socket.Client.SendTo(buffer, Socket.Client.RemoteEndPoint);
            // stream.Write(buffer, 0, buffer.Length);
            //stream.Flush();
            System.Threading.Thread.Sleep(500);
            Console.WriteLine("BUFFER FOR SENT OBJECT WAS :: " + buffer);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a string[] Container object containing computer
 /// Hardware details
 /// </summary>
 /// <returns>String[] Data Container</returns>
 public Container SendComputerDetails()
 {
     Container dataContainer = new Container(GetComputerDetails());
     return dataContainer;
 }
Ejemplo n.º 4
0
 public Container SendHardwareDetails()
 {
     Container dataContainter = new Container(GetHardwareDetails());
     return dataContainter;
 }
Ejemplo n.º 5
0
 public Container GetTaskDetails()
 {
     Container TaskContainer = new Container(this.computer.GetScheduledTasks());
     return TaskContainer;
 }
Ejemplo n.º 6
0
 public Container GetSystemDB()
 {
     Container CompDetailsContainer = new Container(this.DBGetSystemInfo());
     return CompDetailsContainer;
 }
Ejemplo n.º 7
0
 public Container GetServiceDetails()
 {
     Container ServiceContainer = new Container(this.computer.GetServices());
     return ServiceContainer;
 }
Ejemplo n.º 8
0
 public Container GetProcessDetails()
 {
     Container ProcContainer = new Container(this.computer.ReturnProcesses());
     return ProcContainer;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a string[] Communication.Container object containing computer
 /// Hardware details
 /// </summary>
 /// <returns>String[] Data Communication.Container with Hardware Details</returns>
 public Communication.Container SendHardwareDetails()
 {
     Console.WriteLine("Getting Details...");
     Communication.Container dataContainter = new Communication.Container(GetHardwareDetails());
     Console.WriteLine("Returning hardware usage");
     return dataContainter;
 }