User Profile

Collapse

Profile Sidebar

Collapse
nukefusion
nukefusion
Last Activity: Nov 13 '15, 07:30 PM
Joined: Mar 19 '08
Location: Essex, UK
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • There are a number of differences between C# and C++. I'll mention just a few of the key differences here.

    Firstly, C++ programs compile down to machine code, which execute directly on the machine, whereas C# programs compile down to something called IL (Intermediate Language). IL is then executed by something called the CLR (Common Language Runtime). This fact brings us onto the second and probably biggest difference, which is memory...
    See more | Go to post

    Leave a comment:


  • The XmlAttribute only applies to the property it's immediately above; they're not grouped. By default, the properties will export as Nodes. With that class definition, what you'll get will be more like:

    Code:
    <Element Name="" Type="" External="" Events="">
    	<X></X>
    	<Y></Y>
    	<Width></Width>
    	<Height></Height>
    ...
    See more | Go to post

    Leave a comment:


  • The properties in the Elements class that have been decorated with the XmlAttribute metadata will be realised as attributes in the XML file. So it will look more like this:

    Code:
    <Element Name="" Type="" External="">
    </Element>
    See more | Go to post

    Leave a comment:


  • No, you'd need to adjust the Elements class too. I think I'd recreate the XML to map more closely what we are trying to store - a list of forms each with it's own list of elements.

    I'd probably have one class for the Forms collection, let's call it FormsList to avoid confusion (there's already a FormsCollection class in the WinForms namespace)

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    ...
    See more | Go to post

    Leave a comment:


  • Hi Paul,
    Ok, I've had a closer look at the XML and I see what you mean. If you want to de-serialize a single form with multiple elements then I think the issue is probably your XML structure. Currently it's unclear whether the Element node represents a Form, or a Control; it has attributes for both.

    Maybe a structure like the following would work better?

    Code:
    <Forms>
    	<Form name="Test Window"
    ...
    See more | Go to post

    Leave a comment:


  • Hi Rebeccardr,

    Welcome to the forums.

    I've only really used the WebBrowser control a couple of times and both times I remember it being quite painful. Trying to get JavaScript to work can be a nightmare.

    Try something along these lines:

    Code:
            public Form1()
            {
                InitializeComponent();
                MemoryStream HTMLMemory = new MemoryStream();
    ...
    See more | Go to post

    Leave a comment:


  • Hi Paul,

    I've had a look at your code. Is the MakeForm method supposed to just read in the form data at the index specified by the page parameter? Because at the moment your doing a foreach loop over each element in the XML data and creating all the controls for each element, but adding them all to one form instance (form1).

    Code:
     public void makeform(FormData f, int page)
     {
            Form form1 = new
    ...
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to How to optimize app for performance
    in .NET
    Hi sama123,

    You could try using AJAX to provide a better user experience. Read up about the Update Panel.
    Using this method you can refresh the content section only, without the need for a post back.

    Hope this helps.
    Matt.
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to janus gridex speed problem
    Hi aminasad2002,

    Welcome to the forums.

    Sorry but I don't have any personal experience of the Janus grid. You may have more luck if you try asking in the user forums at the Janus Website.

    Kind Regards,
    Matt.
    See more | Go to post

    Leave a comment:


  • Hi mylixes,

    It's difficult to tell without any code sample but somehow either the columns aren't being added, or they're being removed before the rows are added.

    If you're adding columns manually, make sure AutoGenerateCol umns is set to false.

    If you still experience problems, try posting a small code sample that may help us to diagnose the issue.
    See more | Go to post

    Leave a comment:


  • Hi omaragainonthet rack,

    Welcome to the forums.

    To help your question to get answered, please take a look at the Posting Guidelines.

    It will help us to help you if you reformat your post using code tags. It makes it much easier to read. It might be helpful as well if you post the question before the code sample.

    Kindest regards,
    Matt....
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to How to grab text from web browser
    Hi evanc93,

    It might be helpful to us if you can post details of the exact error message you are getting....
    See more | Go to post

    Leave a comment:


  • Hi Paul,
    Some of your code samples are incomplete, for example. you haven't shown the implementations of forwardlink and backlink. Although I can probably guess what they do a complete example would help.

    Are you able to attach an example XML file plus the source? If so I'll look into it for you....
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to GEONOLOGY Concept C#
    I wrote a genealogy program, or, in other words, some family tree software. A basic implementation is fairly easy to achieve, but be aware, if you want to develop it further it's a more in-depth topic than you might first realise.

    If you want to pursue it I'd recommend learning a bit about graph theory. A family tree is just a great big graph. There are already loads of proven algorithms for searching graphs and these will be useful...
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to How to anchor controls in WPF
    in .NET
    WPF introduces a significant change from the old WinForms method of control placement. The anchor property no longer exists.

    Ideally, with WPF, you would design your interfaces to flow and adapt to resizing by nesting them in one or more of the available layout controls, i.e. StackPanel, WrapPanel, Grid, etc.

    If you want to try and emulate old behaviour there are a couple of things you can do.

    If you really...
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to what will this do?
    Without the associated html it's hard to see how this all links up.

    If you doing some work using AJAX you can add any code to refresh the div in the callback method (success_handle r). It looks like you've already got it setup to do something like this as it's already updating the "leaveinserting " div with the return value anyway.

    I'm not quite sure what part of your process isn't working... it looks like all...
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to Data Types
    in C
    A void pointer points to a value that has no specific data type. It could therefore point to a integer, string or more complex type.

    This might be useful if you wanted to pass around a generic type as a parameter to a method. However, because a void pointer has no specific data type, the length and other properties of the data type cannot be determined.
    The downside of this is that it cannot be dereferenced until it is casted...
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to what will this do?
    Well, presumably, within your second div you will have some sort of input field and a button. You could wire up a JS function to the buttons click event and using it add the input field content to your first div. Using the getElementById method you could do something like this for example:

    HTML:

    Code:
    <div id="div1">
    
    </div>
    <div id="div2">
        <textarea
    ...
    See more | Go to post

    Leave a comment:


  • nukefusion
    replied to what will this do?
    If you want to change the contents of a particular div, the code you posted will do the job. Just assign some new, valid HTML to the innerHTML property instead of an empty string.

    Of course, you'll need a way of initiating the change, such as wiring up your JS function to an event.
    See more | Go to post

    Leave a comment:


  • Hi,
    The XML file is comprised of nodes, in your case a table node, a row node, CustomerID node, etc, etc.

    These are quite simply the names of the nodes.

    The data is the bit that comes between the opening and closing tags. For example, your first CustomerID tag has:

    An opening tag: <CustomerID>
    Data: CHOPS
    a closing tag: </CustomerID>

    To extract this data...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...