Flotzam Blog
Updates on the Digital Panopticon

How To Add A New Datasource To Flotzam

October 25, 2007 04:00 by Flotzam

Having just added DIGG to Flotzam, I wanted to document how to add additional datasources:

how to add a new data source to Flotzam

1. Create new data model class that derives from DataModel in data.cs
2. Add this class as a new Object Data Provider to datatemplates.xaml
3. Add new member variable for data at the top of window1.xaml.cs

4. Load member variable and activate it at line 194 of window1.cs.xaml
5. Add to Settings
 5a. Create new tab for settings
 5b. Add settings to Settings Property in Visual Studio Properties
 5c. Update save_click for when user changes settings (window1.cs.xaml line 82)
 5d. Update settings form in window loaded
6. Make a new datatemplate (or else muck with the data model to trick the data binding into working by renaming properties) in datatemplates.xaml
 6a. Do databinding
7. Update PickPanel() method in window1.xaml
 7a. increase random picker by one
 7b. add to giant if statement
 7c. add member variable to count the items
 7d. update line 299 and add that setting to the condition to prevent infinite loop

I think that's it!


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)