Ejemplo n.º 1
0
 private void Init(Computer c, OS os, string name, DatabaseDaemon.DatabasePermissions permissions, string DataTypeIdentifier, string Foldername, Color themeColor)
 {
     this.sideEffect         = new MovingBarsEffect();
     this.Permissions        = permissions;
     this.State              = DatabaseDaemon.DatabaseState.Welcome;
     this.DataTypeIdentifier = DataTypeIdentifier;
     this.DataType           = ObjectSerializer.GetTypeForName(DataTypeIdentifier);
     this.ScrollPanel        = new ScrollableSectionedPanel(26, GuiData.spriteBatch.GraphicsDevice);
     this.TextRegion         = new ScrollableTextRegion(GuiData.spriteBatch.GraphicsDevice);
     this.Foldername         = Foldername == null ? "Database" : Foldername;
     this.ThemeColor         = themeColor;
     if (DataTypeIdentifier.EndsWith("NeopalsAccount"))
     {
         this.WildcardAssets.Add((object)Neopal.PetType.Blundo, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Blundo"));
         this.WildcardAssets.Add((object)Neopal.PetType.Chisha, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Chisha"));
         this.WildcardAssets.Add((object)Neopal.PetType.Jubdub, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Jubdub"));
         this.WildcardAssets.Add((object)Neopal.PetType.Kachici, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Kachici"));
         this.WildcardAssets.Add((object)Neopal.PetType.Kyrill, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Kyrill"));
         this.WildcardAssets.Add((object)Neopal.PetType.Myncl, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Myncl"));
         this.WildcardAssets.Add((object)Neopal.PetType.Pageri, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Pageri"));
         this.WildcardAssets.Add((object)Neopal.PetType.Psybunny, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Psybunny"));
         this.WildcardAssets.Add((object)Neopal.PetType.Scorchum, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Scorchum"));
         this.WildcardAssets.Add((object)Neopal.PetType.Unisam, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Unisam"));
     }
     this.PlaceholderSprite = os.content.Load <Texture2D>("Sprites/Chip");
     this.Triangle          = os.content.Load <Texture2D>("DLC/Sprites/Triangle");
 }
Ejemplo n.º 2
0
 public static DatabaseDaemon.DatabasePermissions GetDatabasePermissionsFromString(string data)
 {
     DatabaseDaemon.DatabasePermissions databasePermissions = DatabaseDaemon.DatabasePermissions.Public;
     if (data.ToLower() == "private" || data.ToLower().StartsWith("admin"))
     {
         databasePermissions = DatabaseDaemon.DatabasePermissions.AdminOnly;
     }
     return(databasePermissions);
 }
Ejemplo n.º 3
0
 public DatabaseDaemon(Computer c, OS os, string name, DatabaseDaemon.DatabasePermissions permissions, string DataTypeIdentifier, string Foldername = null, Color?ThemeColor = null)
     : base(c, name, os)
 {
     this.Init(c, os, name, permissions, DataTypeIdentifier, Foldername == null ? "Database" : Foldername, !ThemeColor.HasValue ? os.highlightColor : ThemeColor.Value);
     this.HadThemeColorApplied = ThemeColor.HasValue;
 }