Jump to content
  • Advertisement

Geronimo2000

Member
  • Content Count

    187
  • Joined

  • Last visited

Community Reputation

270 Neutral

About Geronimo2000

  • Rank
    Member
  1. Ultimately you might want to implement a WeakEventHandler system.
  2. I've been programming with .Net/WinForms for a long time, but I'm brand new to Wpf/.Net 3.0+. I'm going to throw together a PropertyGrid-like control in Wpf as an educational project. 1. Do you think that drawing the grid manually (with the DrawingContext) instead of hosting many sub-elements (specifically, FrameworkElements or UiElements) is a good approach? In WinForms, the grid itself it manually drawn instead of having lots of child windows. In Wpf, though, I suspect it *may* be advantageous to use lots of their FrameworkElements/UiElements to comprise the grid. I just don't know though! And if I were to use lots of Wpf elements, what would the parent panel be? A Canvas? A Grid? 2. How could "virtualization" be relevant to this control. 3. Do you have any random advice or ideas you would like to throw out there? I'm planning to iterate a lot with this project, but I don't want to waste too much time on stuff that is already known by the majority of Wpf developers.
  3. Geronimo2000

    [.net] XmlWriter and new lines

    Yeah, that's exactly what I do, and it kills the formatting for some reason. I've tried several other variations of that as well, and it doesn't work. This seems like some really strange and lame behavior by the XmlWriter.
  4. Here's an example. foreach(string filename in System.IO.Directory.GetFiles(directoryName, "*.txt")) { System.IO.File.Delete(filename); }
  5. I use the .Net Xml namespace off and on, and I've run into an problem. Specifically, I'm using the XmlWriter in .Net 2.0 C#. Here's how I set up the writer settings. XmlWriterSettings writerSettings = new XmlWriterSettings(); writerSettings.ConformanceLevel = ConformanceLevel.Fragment; writerSettings.Indent = true; writerSettings.NewLineOnAttributes = false; If I manually insert a newline after I write out an XmlElement, I lose all the nice indent formatting that the settings give me. Is there a good way to get both of these things? As it is, all the XmlElements come right after each other which is painful to look at.
  6. If there is an impending shift to making all programs very very multi-threaded, what sort of things should I think about and even implement in boilerplate code (i.e. non-application specific libraries, matrix classes, etc.)? My gut feeling is perhaps nothing, but I don't have enough experience to really know.
  7. Geronimo2000

    boost: to use or not to use

    This is a great thread. I've been wondering about boost myself, and now I have a much better understanding of the pros and cons. I do have one tangential question. When you guys talk about distributed builds, I assume you are talking about compiling your game. How do you go about doing this? I'm interested in learning about the process.
  8. Geronimo2000

    [.net] Keyboard input help

    I'm not sure if I fully understand the context for your question, but have you looked at setting up event handlers for .NET controls which trigger when a key is pressed? You could also derive from a .NET control and override OnKeyPress functions.
  9. Geronimo2000

    [.net] [C#] Modifying ArrayList

    I think you should look back at OnTheHeap's response. It's what I do 100% of the time. It works perfectly and is very concise.
  10. Geronimo2000

    [.net] sorting list box items

    Just to clarify, there is obviously no ListBox.Sort() that takes an IComparer. I mistakenly typed that when what I really do is populate an ArrayList, and then call ArrayList.Sort() with an IComparer parameter, and then populate the ListBox with the ArrayList items. It's pretty lame that ListBox.Sort() isn't called when an item is added.
  11. Geronimo2000

    [.net] sorting list box items

    What you're trying to do is possible and should be easy. The way you described doing it seems like a pretty standard way of doing it. I can't see any problems with the code you posted. I'm assuming the problem could be in the code you didn't post. Although, to be 100% honest with you, when I do something similar I always pass in an IComparer to the ListBox.Sort() function instead of overriding IComparable on the ListBox items, so I may be unaware of certain issues with your approach.
  12. If you mean 'how can the return type be a ref return type', the answer is you can't - it's not supported in the language.
  13. I am writing a C# Managed DirectX program with DirectX 9. When I have a lot of objects rendering in my viewport, and I resize the window, the program will stall for about 3 seconds. Is this in any way expected or normal under certain conditions? It seems way too long considering there is no delay when I am not rendering any objects, and when the objects are rendering I am usually rendering at at least 30 fps. Thanks for any help or advice you can throw my way.
  14. There is a function in TabControl called GetTabRect(). Iterate through each tab page, and check for an intersection between the tab page's rectangle and the mouse position. The one that intersects is the the tab page you want.
  15. Geronimo2000

    [.net] WIN 32 API DEAD

    You should learn .NET and use it instead of Win32, although learning both isn't a bad idea.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!