public DeviceWindow()
        {
            InitializeComponent();

            // Initialize cloud API
            string ApiKey = File.ReadAllText(PATH);

            Api = new CloudAPI(ApiKey);

            // Initialize login components
            //LoginWindow lw = new LoginWindow(Api);

            //lw.ShowDialog();
            Api.Login("*****@*****.**", "Lascarsedi12");
            Console.WriteLine(Api.GetStatus());
            Console.WriteLine(Api.GetDeviceList());
        }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         foreach (Models.Device d in Api.GetDeviceList())
         {
             bool   status = Api.GetAuditCheckStatus(d.GUID);
             string full   = d.name + " - Audit check enabled: " + Convert.ToString(status);
             DeviceList.Items.Add(full);
             GUIDKeys.Add(d.GUID);
         }
     }
     catch (CloudAPI.CloudException ce)
     {
         Debug.WriteLine("Caught exception: " + ce.Message);
     }
     catch (Exception ee)
     {
         Debug.WriteLine("Caught exception" + ee.Message);
     }
 }