CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    33

    Please help me with design

    Hello,

    I need to write a small tool which check minimal requirements for some application, i.e. the amount of RAM available etc. There is a list of requirements, so the tool will go through it making verdict "Pass" or "Fail" for each requirement. Additionally it will output additional information into a dedicated listbox, like "You don't have DVD-RW, you won't be able to burn DVD" and so on.

    I was thinking about the following design.
    First, I have some requirements hierarchy:

    CRequirement (abstract)
    -----> CThresholdRequirement (abstract) : public CRequirement
    ---------------> CCPURequirement : public CThresholdRequirement
    ---------------> CRAMRequirement : public CThresholdRequirement
    -----> CBooleanRequirement (abstract) : public CRequirement
    ---------------> CCDRWRequirement : public CBooleanRequirement
    ---------------> CMouseScrollRequirement : public CBooleanRequirement

    (Not everything is here, just the main idea).
    CThresholdRequirement, CBooleanRequirement etc. differ in the way the decide what the verdict is. That is, all the values in CThresholdRequirement are numerical, and the test is passed iff the actual value is greater than (or equal to) the required value. And in CBooleanRequirement all the value are "Yes" or "No", and the test is passed iff the actual value is equal to the required value.

    The last level of the hierarchy is responsible for calculating the actual value (like calling GetSystemInfo() or going to the registry...).

    Now, all these CRequirement children go to the smart CListCtrl2 control (which is derived from the standart CListCtrl). The smart list stores CRequirement pointers and is able to run the tests and then put the results into appropriate columns.

    This seems to be nice, but there is one more problem. The additional messages. The problem is that these messages can't be connected to specific requirement, because they can belong to the group of requirements. For example, there are four requirements: CDROM, CDRW, DVDROM and DVDRW. The customer wants to see four separate lines in the CListCtrl2, and for each line "Pass" or "Fail" should be concluded. But the message which should be in the listbox is one for all these four parameters. For example, if no DVDROM and DVDRW was found, then the message would be "You won't be able to read or burn DVD". And so on. There are also other examples where the message depends on the group of requirements and not on a single one. So I need some message correlator...

    Does anyone have a good nice idea for that?
    Thank you!

  2. #2
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: Please help me with design

    Maybe the smart list box should simply indicate the test and whether it passed or failed. If the user wants more detailed information, he could right-click on an item that failed. The reason for failure could then be displayed in a separate popup - e.g. like a tool-tip or in some kind of popup menu.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  3. #3
    Join Date
    Apr 2005
    Posts
    33

    Re: Please help me with design

    Quote Originally Posted by John E
    Maybe the smart list box should simply indicate the test and whether it passed or failed. If the user wants more detailed information, he could right-click on an item that failed. The reason for failure could then be displayed in a separate popup - e.g. like a tool-tip or in some kind of popup menu.
    No, the problem is that the GUI already exists and cannot be changed (this is what our customers want). So I have to design the tool so that the current GUI will remain unchanged.

    And again, the additional information cannot be connected to specific line in the list, it sometimes depends on several lines...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured