Esempio n. 1
0
        public void Load()
        {
            var fi = new FileInfo(Path.Combine(Utilities.DataFolder, "Hub.json"));

            if (fi.Exists)
            {
                var savedList = Utilities.JSON.Deserialize <List <HubComputer> >(File.ReadAllText(fi.FullName)).Where(x => !string.IsNullOrWhiteSpace(x.MACAddress));
                foreach (var computer in savedList)
                {
                    if (!ComputerList.Any(x => x.MACAddress == computer.MACAddress))
                    {
                        ComputerList.Add(computer);
                    }
                }
            }
            MergeAditServerClientList();
        }