private void CancelBtn_Click(object sender, RoutedEventArgs e) { BoardWindow win = new BoardWindow(this.service, this.boardName); win.Show(); this.Close(); }
private void Back_Click(object sender, RoutedEventArgs e) { BoardWindow boardWindow = new BoardWindow(service); boardWindow.Show(); Close(); }
private void changeBoard() { bi.changeBoard(VM.SelectedBoard); BoardWindow win2 = new BoardWindow(ui); win2.Show(); this.Close(); }
private void UpdateTask_Click(object sender, RoutedEventArgs e) { if (EditTask()) { BoardWindow boardWindow = new BoardWindow(service); boardWindow.Show(); Close(); } }
private void ViewBtn_Click(object sender, RoutedEventArgs e) { if (this.bwdc.BoardName != null) { BoardWindow boardWindow = new BoardWindow(this.service, (string)this.bwdc.BoardName.Content); boardWindow.Show(); this.Close(); } else { MessageBox.Show("Please select a board"); } }
private void RemoveButton_Click(object sender, RoutedEventArgs e) { if (this.cdc.ColumnName1 == null) // no column selected { MessageBox.Show("Please select a column"); } else { this.service.RemoveColumn((string)this.cdc.ColumnName1.Content, this.boardName); BoardWindow win = new BoardWindow(this.service, this.boardName); // return to board window win.Show(); this.Close(); } }
private void unlimitBtn_Click(object sender, RoutedEventArgs e) { if (this.cdc.ColumnName1 == null) // no column selcted { MessageBox.Show("Please select column to limit"); } else { this.service.Unlimit((string)this.cdc.ColumnName1.Content, boardName); BoardWindow win = new BoardWindow(this.service, boardName); win.Show(); this.Close(); } }
private void AddButton_Click(object sender, RoutedEventArgs e) { if (service.AddColumn(this.cdc.ColumnName, this.boardName)) // Successfull adition { BoardWindow win = new BoardWindow(this.service, this.boardName); // return to board window win.Show(); this.Close(); } else if (this.cdc.ColumnName == "" || this.cdc.ColumnName == null) { MessageBox.Show("The column's name is invalid"); } else { MessageBox.Show("This column already exists in the board!"); } }
private void SwitchButton_Click(object sender, RoutedEventArgs e) { if (this.cdc.ColumnName1 == null || this.cdc.ColumnName2 == null) // Columns were not picked { MessageBox.Show("Please select two columns to switch"); } else if (this.cdc.ColumnName1 == this.cdc.ColumnName2) // same column { MessageBox.Show("Please select two different columns!"); } else { this.service.Switch((string)this.cdc.ColumnName1.Content, (string)this.cdc.ColumnName2.Content, boardName); BoardWindow win = new BoardWindow(this.service, boardName); win.Show(); this.Close(); } }
private void limitBtn_Click(object sender, RoutedEventArgs e) { if (this.cdc.ColumnName1 == null) // no column selcted { MessageBox.Show("Please select column to limit"); } int lim; bool isNumeric = int.TryParse(cdc.Lim, out lim); // check is numeric if (String.IsNullOrEmpty(cdc.Lim) || !isNumeric) { MessageBox.Show("Please select a limitation number"); } else { this.service.Limit(Convert.ToInt32(cdc.Lim), (string)this.cdc.ColumnName1.Content, boardName); BoardWindow win = new BoardWindow(this.service, boardName); win.Show(); this.Close(); } }
private void EditButton_Click(object sender, RoutedEventArgs e) { if (CheckDueDate()) // Due date is valid { if (!twdc.Title.Equals("") && !twdc.Description.Equals("")) { InterfaceLayerTask taskToEdit = new InterfaceLayerTask(creationTime, twdc.DueDate.ToString(), twdc.Description, twdc.Title, state); this.service.EditTask(taskToEdit, boardName); BoardWindow win = new BoardWindow(this.service, boardName); win.Show(); this.Close(); } else { MessageBox.Show("Task title and/or description can not be empty!"); } } else { MessageBox.Show("invalid date!"); } }
private void AddButton_Click(object sender, RoutedEventArgs e) { if (!this.service.IsBoardEmpty(boardName)) { if (CheckDueDate()) { string output = service.CreateTask(twdc.DueDate.ToString(), twdc.Title, twdc.Description, boardName); if (output.Equals("")) // Successfull { BoardWindow win = new BoardWindow(this.service, boardName); win.Show(); this.Close(); } else if (output.Equals("limit")) { MessageBox.Show("Limitation Error!!"); } else if (output.Equals("details")) { MessageBox.Show("One of the details is not correct(Title[max. 50 chars] and description[max. 300 chars] should not be empty!"); } else { MessageBox.Show("Board is Empty"); } } else { MessageBox.Show("invalid date!"); } } else { MessageBox.Show("Empty board"); } }