Ejemplo n.º 1
0
        public DiaryUpload()
        {
            InitializeComponent();

            DiaryGroup.ItemsSource = DiaryPager.SetPaging(DiaryList.NeedUploaded(), 55).DefaultView;
            DiarySearch.SetRecordsToShow(55);
        }
Ejemplo n.º 2
0
        public void PageNumberDisplay()
        {
            int PagedNumber = RecordsDisplayed * (DiaryPager.PageIndex + 1);

            if (PagedNumber > DiaryList.Uploaded().Count)
            {
                PagedNumber = DiaryList.Uploaded().Count;
            }
            NumberDisplay.Text = "Showing " + PagedNumber + " of " + DiaryList.Uploaded().Count;
        }
Ejemplo n.º 3
0
        private async void UploadDiary_Click(object sender, RoutedEventArgs e)
        {
            await Repository.UpdateRegularDiaryAsync(DiaryId, SelectionNumber, FilePath);

            SnackbarThree.MessageQueue.Enqueue("Diary " + SelectionNumber + " has been updated");
            SelectedDiary.Clear();
            SearchBox.Clear();
            ChosenDiary.Clear();
            FilePath = null;
            UploadDiary.IsEnabled  = false;
            DiaryGroup.ItemsSource = DiaryPager.SetPaging(DiaryList.NeedUploaded(), 15).DefaultView;
        }
Ejemplo n.º 4
0
 public DiaryView()
 {
     InitializeComponent();
     DiariesGrid.ItemsSource = DiaryPager.SetPaging(DiaryList.Uploaded(), 20).DefaultView;
     DiarySearch.SetRecordsToShow(20);
     int[] RecordsToDisplay = { 20, 50, 100, 500, 1000 };
     foreach (int RecordGroup in RecordsToDisplay)
     {
         Records.Items.Add(RecordGroup);
     }
     Records.SelectedItem = 20;
     RecordsDisplayed     = Convert.ToInt32(Records.SelectedItem);
     PageNumberDisplay();
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Loads the Background image and Stores the Left Menu Navigation Items
        /// </summary>
        public MainWindow()
        {
            CommandModel.SetDateContext(DateTime.Now.Year.ToString());
            UserSettings.SetUp();
            CheckUser();
            UserThemeSettings();
            InitializeComponent();

            string UserName = CommandModel.GetUserContext();

            DiaryList.PrepareList();
            CertifiedPackageList.PreparePackages();
            CheckVersion();

            //Navigates to the Welcome Page
            ContentFrame.Navigate(new Uri("Pages/WelcomePage.xaml", UriKind.Relative));
            HeaderBlock.Text = "Welcome " + UserName;
        }
Ejemplo n.º 6
0
 private void Records_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     RecordsDisplayed        = Convert.ToInt32(Records.SelectedItem);
     DiariesGrid.ItemsSource = DiaryPager.First(DiaryList.Uploaded(), RecordsDisplayed).DefaultView;
     PageNumberDisplay();
 }
Ejemplo n.º 7
0
 private void Last_Click(object sender, RoutedEventArgs e)
 {
     DiariesGrid.ItemsSource = DiaryPager.Last(DiaryList.Uploaded(), RecordsDisplayed).DefaultView;
     PageNumberDisplay();
 }
Ejemplo n.º 8
0
        public static string RetrieveDiaryField(string diaryField)
        {
            DiaryList objdiaryList = DiaryList.Decode(diaryField);

            return(objdiaryList.ToString());
        }