private void EditCancelBtn_Click(object sender, RoutedEventArgs e) { EditNameTb.Text = latestName; EditDOBDpk.Date = latestDOB; EditHeightTb.Text = latestHeight; EditWeightTb.Text = latestWeight; EditCurrentLocationRBtn.IsChecked = latestCurrentLocationR; EditOtherRBtn.IsChecked = latestOtherR; EditOtherTb.Text = latestOther; EditTelTb.Text = latestTel; EditFlyout.Hide(); }
private void EditEvent_Click(object sender, RoutedEventArgs e) { EditFlyout.Hide(); int itemIndex = EventListView.SelectedIndex; Events editedEvent = EventsManager.loveEvents[itemIndex]; EditedEvent.SetEditedEvent(editedEvent); SelectedFold.selectedFoldIndex = FoldIndexConstants.loveEvent; SelectedEventIndex.selectedItemIndex = itemIndex; OnNavigateParentReady(this, null); }
private void EditEvent_Click(object sender, RoutedEventArgs e) { EditFlyout.Hide(); int itemIndex = EventListView.SelectedIndex; Events editedEvent = EventsManager.GetSingleEventByIndex(foldIndex, itemIndex); EditedEvent.SetEditedEvent(editedEvent); SelectedFold.selectedFoldIndex = foldIndex; SelectedEventIndex.selectedItemIndex = itemIndex; OnNavigateParentReady(this, null); }
private void EditConfirmBtn_Click(object sender, RoutedEventArgs e) { int age = DateTime.Now.Year - EditDOBDpk.Date.Year; if (EditDOBDpk.Date.AddYears(age) > DateTime.Now) { age--; } ShowNameTbl.Text = EditNameTb.Text; ShowAgeTbl.Text = age.ToString("G"); ShowHeightTbl.Text = EditHeightTb.Text; ShowWeightTbl.Text = EditWeightTb.Text; ShowTelTbl.Text = "Tel. " + EditTelTb.Text; EditFlyout.Hide(); }
private void ConfirmEdit_Click(object sender, RoutedEventArgs e) { activeTask = CreateTestFromFlyout(activeTaskType); if (activeTask != null) { if (activeTaskIsNowBg) { if (activeTaskWasBg && activeTaskIndex >= 0) { BackgroundTasksCollection[activeTaskIndex] = activeTask; } else if (!activeTaskWasBg && activeTaskIndex >= 0) { BackgroundTasksCollection.Add(activeTask); TasksCollection.RemoveAt(activeTaskIndex); } else { BackgroundTasksCollection.Add(activeTask); } } else { if (activeTaskWasBg && activeTaskIndex >= 0) { TasksCollection.Add(activeTask); BackgroundTasksCollection.RemoveAt(activeTaskIndex); } else if (!activeTaskWasBg && activeTaskIndex >= 0) { TasksCollection[activeTaskIndex] = activeTask; } else { TasksCollection.Add(activeTask); } } listEdited = true; } if (BackgroundTasksCollection.Count > 0) { BgTasksHeader.Visibility = Visibility.Visible; } else { BgTasksHeader.Visibility = Visibility.Collapsed; } if (TasksCollection.Count > 0) { TasksHeader.Visibility = Visibility.Visible; } else { TasksHeader.Visibility = Visibility.Collapsed; } EditFlyout.Hide(); }
private void CancelEdit_Click(object sender, RoutedEventArgs e) { activeTask = null; activeTaskIndex = -1; EditFlyout.Hide(); }