Jump to content
Xtreme .Net Talk

Diesel

Avatar/Signature
  • Posts

    682
  • Joined

  • Last visited

Diesel's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. You have to change the form text from the same thread that the form was created, which you can access in a function by using the Invoke method. To verify whether you are in form's originating thread, you can use the Control.InvokeRequired property. I would move the operations out of the event method first. Private Sub Worker_ProgressChanged(ByVal Progress As Integer) Handles Worker.ProgressChanged ChangeTitle(Progress) End Sub Delegate Sub ChangeTitleDelegate(ByVal Title As String) Private Sub ChangeTitle(ByVal Title As String) If (InvokeRequired) Then Invoke(New ChangeTitleDelegate(AddressOf ChangeTitle), Title) Else Me.Text = Title End If End Sub
  2. How much flexibility do you need? Is XSL-T an option. IME xsl-t's are the fastest replacement option. XmlDocument's are extremely thick objects though, and creating an XslNavigator uses even more memory. If it really is as simple as replacing text, I would stick with StringBuilder. It's the easiest to maintain, uses the least memory and is fastest with small sets.
  3. I mispelled Eclipse, Ecliple is catchy though. Is this for work or for a personal project?
  4. Yeh, you obviously should seperate the interfaces into a seperate dll. Also, the way you are designing the plug-in system is the same way it's designed on all the plug-in examples online (codeproject, sourceforge, etc), which isn't very extensible. What is your central repository of modules? A database, xml file? Why not have the plug-in system parse a certain directory and look for dll's that contain classes that implement the module interfaces? This would be much more flexible. Having a single interface that every plug-in must implement is not extensible. How is that extensible? How many different kinds of plug-ins are you going to have, how are they going to communicate with data, with the UI? Instead, use attributes to define an interface as a plug-in interface and another attribute to define a class as a connector to that interface. [slot("VideoPlugin")] public interface IVideoPlugin [Connector("VideoPlugin")] public sealed class VlcPlugin And what are you talking about, you instantiate an object of every plug-in module at start-up?? How is that flexible? Flexible would mean the plug-in is instantiated when it is used. Also, the ability to remove and add plug-ins at run-time is extensible. Reflection. Don't underestimate the complexity of a plug-in system. Ecliple is an example of a well-architected plug-in system. The OSGI is a specification for a plug-in system.
  5. Last time I checked Software Development was a profession. How about you come to my house and fix my door, thank you so much in advance.
  6. Which database server? With Sql Server 2005+, you can bulk load xml files with OPENROWSET. http://weblogs.sqlteam.com/mladenp/archive/2007/06/18/60235.aspx
  7. So, you have no access to the data source? You want to resize a webbrowser control to perfectly fit the table? It's fragile, and I would not recommend to do it that way. I'd keep trying to parse the data. Here's a trick I used with my RSS reader. Take the table tag and it's children and load it as a string into an XmlDocument object. Walk the inner table tag and it's children and rip the data from the td tags. You have to keep a counter to keep track of which td tag belongs to what property. It's still fragile, but you can display and manipulate it anyway you want, and you could use a configuration file to keep track of which fields are associated with what property names. And if you want to keep it real flexible, instead of creating a class for storing the data, just use a dictionary.
  8. Microsoft wants to be able to handle the exception, to make sure that it wasn't their fault that it was caused in the first place, ie. invalid data in memory. You can handle the exception, just make sure you rethrow the error. If you don't want the Windows Exception dialog to show up, exit the program. Just make sure the application exits after handling the exception, otherwise you don't know what state your application is in and it could cause damage.
  9. I've been wondering this for a while, might as well pose the question here. I have interface A and class B defined as: public interface A { string Name { get; set; } string Desc { get; set; } } public class B: A { private string m_Name; private string m_Desc; string A.Name { get { return m_Name; } set { m_Name = value; } } string A.Desc { get { return m_Desc; } set { m_Desc = value; } } } [/Code] I want to data-bind an array (or list, doesn't matter) of Class B to a datagrid. How do I do it?
  10. Weird. Read the registry keys: http://www.mydigitallife.info/2007/05/23/how-to-get-actual-build-and-revision-number-of-windows-vista-or-longhorn-server-installed/ There you can get the product name, Vista or Server, etc.
  11. I would also recommend using the factory pattern in ADO.Net instead of constructors. This way, you could switch the type of storage with a singe line of code or configuration setting. http://msdn.microsoft.com/en-us/library/ms971499.aspx
  12. Yeh, that's a slippery slope. I would definitely not try to parse a binary file with regex's. If a field changes the regex may not work. Also, your assumption is that the current file format is the full specification, which it may not be. There may be fields missing because it is the 1st of the month or some weird rule like that. Is there a MS spec or api to read this file?
  13. Ok. How did you try to get the folder? Use Environment.GetFolderPath. Something like: System.Environment.GetFolderPath(Environment.SpecialFolder.Personal)
  14. System.Environment.OSVersion
  15. I've had a good amount of experience with xml, and no, I'd say in this case, there's no parsing shortcut.
×
×
  • Create New...