Exemplo n.º 1
0
 private void BackgroundWorkerOnDoWork(object sender, DoWorkEventArgs doWorkEventArgs)
 {
     BackgroundWorker worker = sender as BackgroundWorker;
     if (rawData.Count > 0)
     {
         var rawItem = rawData.Dequeue();
         var bookModel = new BookModel(rawItem);
         listBookModels.Add(bookModel);
     }
 }
Exemplo n.º 2
0
 private void updateRow(BookModel model)
 {
     BookModel bookModel = listBookModels.FirstOrDefault(m => m.id == model.id);
     bookModel = model;
 }
Exemplo n.º 3
0
 private void addRow(BookModel model)
 {
     listBookModels.Add(model);
 }
Exemplo n.º 4
0
        private void radGridView2_CurrentRowChanging(object sender, CurrentRowChangingEventArgs e)
        {
            try
            {
                radButtonElement2.Enabled = true;
                cacheLastRow = rowCaching(e.CurrentRow.Cells[0].Value.ToString());
                cacheNewRow = rowCaching(e.NewRow.Cells[0].Value.ToString());
                radPropertyGrid1.SelectedObject = cacheNewRow;

                if (!String.IsNullOrWhiteSpace(cacheNewRow.book_image))
                {
                    pictureBox2.Image = FormHelper.FetchLargeThumb(cacheNewRow.book_image);
                }
                //else if (!String.IsNullOrWhiteSpace(bookModel.image_path))
                //{
                //    pictureBox2.Image = FormHelper.FetchImage(bookModel.image_path, 250, 150);
                //}
                else
                {
                    pictureBox2.Image = null;
                }
            }
            catch (Exception ex)
            {

            }
        }