Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. XMLDocument for all MDI children

XMLDocument for all MDI children

Scheduled Pinned Locked Moved C#
dockerquestion
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    Is it possible to have one XMLDocument for all MDI Children so that I only need to invoke the .save once from MDI container instead of doing it every time in every child?

    E M 2 Replies Last reply
    0
    • J Jassim Rahma

      Is it possible to have one XMLDocument for all MDI Children so that I only need to invoke the .save once from MDI container instead of doing it every time in every child?

      E Offline
      E Offline
      Eslam Afifi
      wrote on last edited by
      #2

      Yes.

      Eslam Afifi

      1 Reply Last reply
      0
      • J Jassim Rahma

        Is it possible to have one XMLDocument for all MDI Children so that I only need to invoke the .save once from MDI container instead of doing it every time in every child?

        M Offline
        M Offline
        Mustafa Ismail Mustafa
        wrote on last edited by
        #3

        You sound like you need to consider using the Observer pattern:

        • http://en.wikipedia.org/wiki/Observer_pattern[^]
        • http://www.dofactory.com/Patterns/PatternObserver.aspx[^] (sample implementation)

        With all the children being registered observers, you just need to fire up the save method in the object (MDI form) and it'll take care of saving the other forms.

        If the post was helpful, please vote, eh! Current activities: Book: Devils by Fyodor Dostoyevsky Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups