示例#1
0
 public MoodlightPreset method_3(string string_0)
 {
     string[] array = string_0.Split(new char[]
     {
         ','
     });
     if (!this.method_5(array[0]))
     {
         array[0] = "#000000";
     }
     return(new MoodlightPreset(array[0], int.Parse(array[1]), HabboIM.StringToBoolean(array[2])));
 }
示例#2
0
        public MoodlightData(uint mItemId)
        {
            this.ItemId = mItemId;
            DataRow Row = null;

            using (DatabaseClient @class = HabboIM.GetDatabase().GetClient())
            {
                Row = @class.ReadDataRow("SELECT enabled,current_preset,preset_one,preset_two,preset_three FROM room_items_moodlight WHERE item_id = '" + mItemId + "' LIMIT 1");
            }
            if (Row == null)
            {
                throw new ArgumentException();
            }
            this.Enabled       = HabboIM.StringToBoolean(Row["enabled"].ToString());
            this.CurrentPreset = (int)Row["current_preset"];
            this.Presets       = new List <MoodlightPreset>();
            this.Presets.Add(this.method_3((string)Row["preset_one"]));
            this.Presets.Add(this.method_3((string)Row["preset_two"]));
            this.Presets.Add(this.method_3((string)Row["preset_three"]));
        }