public void AddDefaultItem(int index) { PlayerSubCategory localplayers, visitorplayers; TagSubCategory period; TeamSubCategory team; Color c = new Color((Byte)255, (Byte)0, (Byte)0); HotKey h = new HotKey(); team = new TeamSubCategory { Name = Catalog.GetString("Team"), AllowMultiple = false, FastTag = true }; team.Add(Team.LOCAL); team.Add(Team.VISITOR); localplayers = new PlayerSubCategory { Name = Catalog.GetString("Local Team Players"), AllowMultiple = true, FastTag = true }; localplayers.Add(Team.LOCAL); visitorplayers = new PlayerSubCategory { Name = Catalog.GetString("Visitor Team Players"), AllowMultiple = true, FastTag = true }; visitorplayers.Add(Team.VISITOR); period = new TagSubCategory { Name = Catalog.GetString("Period"), AllowMultiple = false, FastTag = true, }; period.Add("1"); period.Add("2"); Category cat = new Category { Name = "Category " + index, Color = c, Start = new Time { Seconds = 10 }, Stop = new Time { Seconds = 10 }, SortMethod = SortMethodType.SortByStartTime, HotKey = h, Position = index - 1, }; cat.SubCategories.Add(team); cat.SubCategories.Add(localplayers); cat.SubCategories.Add(visitorplayers); cat.SubCategories.Add(period); Insert(index, cat); }
public void AddDefaultSubcategories(Category cat) { TagSubCategory resultsubcat; resultsubcat = new TagSubCategory { Name = Catalog.GetString("Outcome"), AllowMultiple = false, }; resultsubcat.Add(Catalog.GetString("Success")); resultsubcat.Add(Catalog.GetString("Failure")); cat.SubCategories.Add(resultsubcat); }
private void AddTag(string tag, bool update) { HBox box; Label label; Button button; if (tagsDict.ContainsKey(tag)) { return; } box = new HBox(); label = new Label(tag); label.Justify = Justification.Left; button = new Button("gtk-delete"); button.Clicked += delegate { RemoveTag(tag); }; box.PackStart(label, true, false, 0); box.PackStart(button, false, false, 0); tagsbox.PackStart(box, false, false, 0); box.ShowAll(); tagsDict.Add(tag, box); if (update) { template.Add(tag); } }