private void Menu_CategorySelected(ViewRunsPage.Category obj) { this.RemoveSelectedRun(); if (obj == null) { this.SelectedButton.ShadowColour = (Color)Application.Current.TryFindResource("ControlBackgroundColour"); } else { this.SelectedButton.ShadowColour = obj.Colour; this.AddSelectedRun(obj); } this.SaveCategories(this.ProjectDirectory, this.Categories); }
private void Menu_NewCategory(ViewRunsPage.Category obj) { Category[] newList = null; if (Categories == null) { newList = new Category[1]; newList[0] = obj; } else { newList = new Category[this.Categories.Length + 1]; Array.Copy(this.Categories, newList, this.Categories.Length); newList[this.Categories.Length] = obj; } this.Categories = newList; this.SaveCategories(this.ProjectDirectory, this.Categories); this.Menu.Categoies = this.Categories; }