예제 #1
0
        private void CreateButton_Click(object sender, RoutedEventArgs e)
        {
            var newCorkboard = ValidateCorkboard();

            if (newCorkboard == null)
            {
                CreatePopup("Invalid corkboard information supplied.");
                return;
            }

            var alreadyExists = AddCorkboardHelper.CheckCorkboardExists(PreviousPage.MainWindow.User, newCorkboard.Title);

            if (alreadyExists)
            {
                CreatePopup("Corkboard already exists with that title from this user.");
                return;
            }

            AddCorkboardHelper.AddCorkboard(PreviousPage.MainWindow.User, newCorkboard);
            PreviousPage.MainWindow.Navigate(new ViewCorkboard(PreviousPage, PreviousPage.MainWindow.User, PreviousPage.MainWindow.User, newCorkboard.Title));
        }
예제 #2
0
        private void PopulateCategoryDropdown()
        {
            var categories = AddCorkboardHelper.GetCategories();

            CategoryComboBox.ItemsSource = categories;
        }