Jump to content
Xtreme .Net Talk

Diesel

Avatar/Signature
  • Posts

    682
  • Joined

  • Last visited

Everything posted by Diesel

  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.
  16. Yeh, you can pull off that scenario with a loosely typed language, but .Net is strongly typed. In my experience, interfaces are seperated into their own assembly. If you put IExt into a seperate assembly and reference it from both main and whatever project you are using, then the extension project will be replaceable. Although your definition of replaceable is somewhat inflexible, as the solution needs to be recompiled. Also, the guideline for naming interfaces is to prepend a capital I. Also, extention is not a word, but extension is. and you should declare scope for all class variables, ie. the dict variable. and finally, one more tip, put more thought into the design. Maybe you should be dynamically loading assemblies to get a certain class? or using generics to strongly type the extension class?
  17. Disable the control state for the dropdownlist. Set the default to selectedindex of -1.
  18. Gracias.
  19. Anyone know of a tool or how to poll an ftp site on the local computer to see if it's down and restart it if it is?
  20. I used .Net 2.0 in order to have a low initial adoption cost. Almost everyone has .Net 2.0 as it's installed with XP, but very few people have 3.0/5. The UI was created using DevExpress controls, which I highly recommend. Their service is great too. Check out the memory allocation, it's very low compared to other readers. The DevExpress controls have some really efficient allocation techniques.
  21. Bug Fixed. The program has an auto update feature. It checks for updates when you start the program, downloads them and installs them when you exit the application. So, you can let the program update itself, meaning it wouldn't be updated until you start it a second time, or you can download the newest version. You don't have to manually uninstall the previous version when installing a new version. Thanks for the feedback. Oh, I also noticed a bug when creating a newspaper with a user added feed, it always add it to the Misc section. I'm fixing it now.
  22. Hi, I've developed an RSS aggregrator for Windows. There are dozens of RSS readers out there already, but this one uses a different philosophy. It doesn't bombard you with information, the interface was well thought out, and there is no maintenance at all, unlike the current generation of readers that alert you to delete posts everyday. I'm in need of a beta audience. It's completely functional right now, but there may be some minors bugs and tweaks to make. Any feedback at this stage will immediately effect the product. Check it out at: http://www.realsimplenewsreader.com
  23. Talk about a black box. ahahaha.
  24. Optional? Blasphemy! In what html spec are you talking about, 4.01? Welcome to the future, welcome to Xhtml.
  25. What is the error message? Nothing is being displayed in the table? From the snippet you posted, I can tell you need to end your table rows.... "<td align=left>Salary</td></tr>" "<td align=left>230000</td></tr>" You didn't post the declaration of tstrHTML,but it should have a scope of at least Friend.
×
×
  • Create New...