Exemplo n.º 1
0
 public void AddRange(Computer[] coms)
 {
     foreach (Computer computer in coms)
     {
         frameSended += computer.Received;
     }
     Computers.AddRange(coms);
 }
Exemplo n.º 2
0
        public void RebuildDatabase()
        {
            if (!sqlite)
            {
                Database.Delete();
                Database.Create();
            }

            Computers.AddRange(Node.Defaults);
            SaveChanges();
            Binaries.AddRange(Binary.getBinaries());
            ServerAccounts.AddRange(ServerAccount.Defaults);
            SaveChanges();
            var defAcc = ServerAccounts.First();

            defAcc.Nodes.Add(Node.Defaults[0]);
            defAcc.netmap.Add(new ServerAccount.NetMapNode(Node.Defaults[0].ip, "0,0"));
            SaveChanges();
        }