예제 #1
0
 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());
 }
예제 #2
0
 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";
     }
 }
예제 #3
0
 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";
     }
 }
예제 #4
0
 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";
     }
 }
예제 #5
0
        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));
                    }
                }
            }
        }
예제 #6
0
 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";
 }
예제 #7
0
 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";
             }
         }
     }
 }