示例#1
0
 public bool RemoveScreen(long id)
 {
     if (ScreenCollection.Count(ent => ent.ID == id) > 0)
     {
         return(ScreenCollection.Remove(ScreenCollection.First(ent => ent.ID == id)));
     }
     else
     {
         return(false);
     }
 }
示例#2
0
 public Screen GetScreen(string name)
 {
     if (ScreenCollection.Count(ent => ent.Name == name) > 0)
     {
         return(ScreenCollection.First(ent => ent.Name == name));
     }
     else
     {
         return(null);
     }
 }
示例#3
0
 public Screen GetScreen(long id)
 {
     if (ScreenCollection.Count(ent => ent.ID == id) > 0)
     {
         return(ScreenCollection.First(ent => ent.ID == id));
     }
     else
     {
         return(null);
     }
 }
示例#4
0
 public bool RegisterScreen(Screen screen)
 {
     if (ScreenCollection.Count(ent => ent.ID == screen.ID) > 0)
     {
         return(false);
     }
     else
     {
         ScreenCollection.Add(screen);
         return(true);
     }
 }