Ejemplo n.º 1
0
        protected void OnUpdateTaskList(CommandArrayInfo ci)
        {
            BugInfo bug = GetSelection().FirstOrDefault();

            foreach (var t in server.Tags)
            {
                CommandInfo c = ci.Add(t.Name, t.Name);
                c.Icon = string.Format("#{0:x2}{1:x2}{2:x2}", t.Color.Red >> 8, t.Color.Green >> 8, t.Color.Blue >> 8);
                if (bug != null)
                {
                    c.Checked = bug.HasTag(t.Name);
                }
                else
                {
                    c.Enabled = false;
                }
            }
        }