Ejemplo n.º 1
0
        private void ProcessSendInfo(byte[] info)
        {
            string message = DecryptStringFromBytes_Aes(info, myAes.Key, myAes.IV);

            JObject jObject = JObject.Parse(message);
            string  ip      = jObject["ip"].ToString();

            string    connection = jObject["connectionString"].ToString();
            RDPClient client     = new RDPClient(connection, ip);

            HostList.clients.Add(client);
            Distribute.clients.Add(client.ip);
            HostList.Instance().CreateControl();
            if (HostList.Instance().IsHandleCreated)
            {
                HostList.AddClient(client);
            }
            if (InstallApps.Instance().IsHandleCreated)
            {
                InstallApps.AddClient(client);
            }
            if (Distribute.Instance().IsHandleCreated)
            {
                Distribute.AddClient(client);
            }
        }
Ejemplo n.º 2
0
 public static InstallApps Instance()
 {
     if (instance == null)
     {
         instance = new InstallApps();
     }
     return(instance);
 }
Ejemplo n.º 3
0
        private void OnInstallClick(object sender, EventArgs e)
        {
            InstallApps main = InstallApps.Instance();

            content.Controls.Clear();
            content.Controls.Add(main);
            main.Show();
        }
Ejemplo n.º 4
0
        private void ProcessInstall(byte[] info)
        {
            string   message  = DecryptStringFromBytes_Aes(info, myAes.Key, myAes.IV);
            Response response = JsonConvert.DeserializeObject <Response>(message);

            if (response.isSucces)
            {
                InstallApps.AddSuccesufulClient(response.ip);
            }
            else
            {
                InstallApps.AddFailClient(response.ip);
            }
        }