Search results for query: *

  • Users: DoJa
  • Order by date
  1. D

    Where should I store my encryption keys?

    What is current best practice regarding implementing encryption within a c# program and can anyone recommend some good articles/tutorials/examples? Basically I want to create an application which makes use of encryption (using standard .net libraries) for internal security features. It will not...
  2. D

    Filtering a listview bound to a datatable

    I have a datatable bound to a listview which displays the output of a SQL select statement. I wish to filter what is displayed in the listview based upon text entered into a textbox above it. I have found numerous examples of filtering listviews in this way but all of them are using hardcoded...
  3. D

    Calling a method from a combo box selection?

    That turned out to be a little easier than expected. Couldn't find anything particularly useful from extensive Google searching but a bit of experimentation yielded the desired result. Was able to get the desired result in 3 steps. 1. Put method call beneath OnpropertyChanged for...
  4. D

    Calling a method from a combo box selection?

    I have a project with a ComboBox which lists each day of the week. The user should be able to select a day of the week from the combobox drop down to make 'stuff happen'. In the code behind I have a method which accepts a string overload for the day of week eg. update("Monday"); I know how...
  5. D

    Help with Data Binding and Images

    Thanks John. What is the purpose of the wpf way of doing things with databinding and interfaces rather than traditional methods ... Is it really a step in the right direction? To the uninformed it seems like a massive overhead of additional lines of code which perform no direct business...
  6. D

    Help with Data Binding and Images

    Thanks. So iNotifyPropertyChanged is an interface? and I can implement them by adding them at the top of a class , separating with commas if I need more than one? Are these interfaces a type of method or class in themselves or a totally separate entity in their own right? Are interfaces such as...
  7. D

    Help with Data Binding and Images

    Thank you John, I've got it working following your advice. What does the property/identifier after the colon following the class deceleration mean and what other variations are there? For example. By default a new window has: public partial class MainWindow : Window and one of the things I...
  8. D

    Help with Data Binding and Images

    I have spent the day reading up on this and finally got a working example of some code which binds an image path to a binding source. The problem is, I can only set it once when it first loads. After that I am unable to change the image to something different. I guess it is something to do...
  9. D

    MVVM in Practice

    Hi Herman, Thanks for your reply. You are correct, I am new to WPF. My experience is with winforms but it has a number of limitations which are solved with WPF. Basically I'm trying to write Version 4 of an application which is currently a winforms app but in WPF. I want to take advantage of...
  10. D

    MVVM in Practice

    So i've been reading/watching lots about MVVM and pretty much got my head around the concept but still struggling a little with the practical implementation side of it. I have read that a benefit of MVVM is that it makes testing easier: You can have two views (an presumably two view-models) for...
  11. D

    Looping through controls on a window.

    jmcilhinney, you are a legend. If you lived nearer I'd buy you a beer! Thanks for the in depth explanation.
  12. D

    Looping through controls on a window.

    I have a number of list box controls which I would like to clear using a loop rather than typing individually. I was able to do this quite easily in winforms but cannot fathom how to achieve the same under wpf. The closest I have got is this: foreach (Control c in this.gdLayout.Children)...
  13. D

    Playing MP3 from resource file

    Seems like wav files are the way forward but finding out how to play them from a resource file rather than a url was harder to track down. For the benefit of anyone else looking for a solution here is how to play a wav from a resource in c# System.Media.SoundPlayer player = new...
  14. D

    Searching a database/dataset

    Fair point, but its nice to get the opinions of others to make a start in the right direction. I'll try the direct db search first and if that is too slow, attempt the alternative. Mobile device in question will be a win8 pro laptop rather than a phone so processing power will not be an issue...
  15. D

    Searching a database/dataset

    **Edit - Sorry jmcilhinney, looks like you posted whilst i was writing a response, not sure if what I wrote is still relevant as I was replying to wim ** :) They are indeed, but over a low bandwidth mobile connection it might be too noticeable. An app might be more useable if it took 30s to...
  16. D

    Searching a database/dataset

    I need to create a page which allows the user to search through a database table and return any records which match the keyword entered. A number of websites I use have a very elegant search function of this nature where it will search any matching surname or forename without needing to specify...
  17. D

    Playing MP3 from resource file

    I did look for other members and did not spot anything obvious. Saving the data to a file makes sense but seems a little overcomplicated for what ought to be a simple operation. I am just making a very small application as a means of learning how to use the WPF framework and was hoping to keep...
  18. D

    Playing MP3 from resource file

    I'm using the following code to play an mp3 file. WMPLib.WindowsMediaPlayer wplayer = new WMPLib.WindowsMediaPlayer(); wplayer.URL = "c:\\sample.mp3"; wplayer.controls.play(); This works great but requires an absolute path to the file which is undesirable. I tried changing the...
  19. D

    Best Practice many forms

    I understand the logic of the single responsibility principle. However I think that could by achieved by keeping the bulk of the functionality outside of the form itself and instead within external classes. The question is if there are performance gains to be had from using something like a tab...
  20. D

    Best Practice many forms

    Hey all, I wrote an application about 3 years ago which has been an on-going work in progress but I have now decided to re-write it from the ground up to put right all the mistakes I made along the way. I was hoping I could get some advice from some more experienced programmers in the community...
Back
Top Bottom