private void loadBoardButton_Click(object sender, RoutedEventArgs e)
        {
            hideWarningLabels();
            if (verifyBoardNameInput() == true)
            {
                // verify board is already loaded on the background
                if (board != null)
                {
                    // verify loaded boardID is same as searched one
                    if (BoardsDO.GetBoardID(kanbanBoardTextInput.Text) == boardID)
                    {
                        // if they are the same return loaded board
                        board.LoadBoard(boardID);
                        this.Close();
                    }
                    else
                    {
                        // Create Board Window
                        KanbanBoardWindow newBoardWindow =
                            new KanbanBoardWindow(BoardsDO.GetBoardID(kanbanBoardTextInput.Text));

                        board.Close();
                        this.Close();

                        // Show Kanban Board Window
                        newBoardWindow.Top  = 100;
                        newBoardWindow.Left = 150;
                        newBoardWindow.Show();
                    }
                }

                // if board is not loaded on the background create new one
                else
                {
                    // Create Board Window
                    KanbanBoardWindow kanbanBoardWindow =
                        new KanbanBoardWindow(BoardsDO.GetBoardID(kanbanBoardTextInput.Text));
                    // Closes Create Board WIndow
                    this.Close();
                    // Show Kanban Board Window
                    kanbanBoardWindow.Top  = 100;
                    kanbanBoardWindow.Left = 150;
                    kanbanBoardWindow.Show();
                }
            }
        }
Exemple #2
0
        // Method creates columns in boards
        private void createColumnsButton_Click(object sender, RoutedEventArgs e)
        {
            // Hide warning labels
            hideColumnsWarningLabels();

            // Verify input

            if (verifyColumnsInput(getColumnNames()) == true)
            {
                ColumnsDO.CreateColumns(BoardsDO.GetBoardID(myBoard.BoardName), getColumnNames());
                // Create Board Window
                KanbanBoardWindow kanbanBoardWindow =
                    new KanbanBoardWindow(BoardsDO.GetBoardID(myBoard.BoardName));
                // Closes Create Board WIndow
                this.Close();
                // Show Kanban Board Window
                kanbanBoardWindow.Top  = 100;
                kanbanBoardWindow.Left = 150;
                kanbanBoardWindow.Show();
            }
            ;
        }