private void Demo_Click(object sender, RoutedEventArgs e) { demoOn = true; Side_Menu.SelectedIndex = 1; Frame_Change.Navigate(new Uri("Pages/Appointments.xaml", UriKind.Relative)); MyEvents.DemoEvents.AlreadyInAppointmetns.RaiseMyCustomEvent(this, new EventArgs()); }
private void Feedback_Click(object sender, RoutedEventArgs e) { if (!demoOn) { Side_Menu.SelectedItem = null; Frame_Change.Navigate(new Uri("Pages/Feedback.xaml", UriKind.Relative)); Section_Label.Text = "Feedback"; } }
private void VacationRequest_Click(object sender, RoutedEventArgs e) { if (!demoOn) { Side_Menu.SelectedItem = null; Frame_Change.Navigate(new Uri("Pages/VacationRequest.xaml", UriKind.Relative)); Section_Label.Text = "Zahtev za odmor"; } }
private void Profile_Click(object sender, RoutedEventArgs e) { if (!demoOn) { Side_Menu.SelectedItem = null; Frame_Change.Navigate(new Uri("Pages/ProfileAndNotification/Profile.xaml", UriKind.Relative)); Section_Label.Text = "Profil"; } }
private void Notifications_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!demoOn) { if (NotificationsList.SelectedItem != null) { NotificationHCI notification = (NotificationHCI)NotificationsList.SelectedItem; if (notification.category.Equals(NotificationCategory.MEDICATION.ToString())) { Frame_Change.Navigate(new Uri("Pages/Medications.xaml", UriKind.Relative)); } else if (notification.category.Equals(NotificationCategory.SCHEDULE.ToString())) { Frame_Change.Navigate(new Uri("Pages/Schedule.xaml", UriKind.Relative)); } else if (notification.category.Equals(NotificationCategory.BLOG.ToString())) { Frame_Change.Navigate(new Uri("Pages/Blog.xaml", UriKind.Relative)); } } } }
private void Archive_Click(object sender, RoutedEventArgs e) { Side_Menu.SelectedItem = null; Frame_Change.Navigate(new Uri("Pages/Archive.xaml", UriKind.Relative)); Section_Label.Text = "Arhiva"; }
private void Side_Menu_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!demoOn) { if (Side_Menu != null && Frame_Change != null) { if (Schedule_Item.IsSelected) { if (GridMenu.Width == 200) { ButtonCloseMenu.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } Frame_Change.Navigate(new Uri("Pages/Schedule.xaml", UriKind.Relative)); Section_Label.Text = "Raspored"; } else if (Appointments.IsSelected) { if (GridMenu.Width == 200) { ButtonCloseMenu.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } if (appointmentController.NotFinishedByDoctorAndDay(MainWindow.doctor, DateTime.Today).ToList().Count == 0) { Frame_Change.Navigate(new Uri("Pages/NemaPregleda.xaml", UriKind.Relative)); } else { Frame_Change.Navigate(new Uri("Pages/Appointments.xaml", UriKind.Relative)); } Section_Label.Text = "Pregledi"; } else if (Patients.IsSelected) { if (GridMenu.Width == 200) { ButtonCloseMenu.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } Frame_Change.Navigate(new Uri("Pages/Patients.xaml", UriKind.Relative)); Section_Label.Text = "Pacijenti"; } else if (Medications.IsSelected) { if (GridMenu.Width == 200) { ButtonCloseMenu.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } Frame_Change.Navigate(new Uri("Pages/Medications.xaml", UriKind.Relative)); Section_Label.Text = "Lekovi"; } else if (Blog.IsSelected) { if (GridMenu.Width == 200) { ButtonCloseMenu.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } Frame_Change.Navigate(new Uri("Pages/Blog.xaml", UriKind.Relative)); Section_Label.Text = "Blog"; } } } }