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. how to handle history (Edit>Undo Redo)

how to handle history (Edit>Undo Redo)

Scheduled Pinned Locked Moved C#
tutorialquestion
4 Posts 4 Posters 0 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.
  • S Offline
    S Offline
    Susuko
    wrote on last edited by
    #1

    I want to give at the user this possibility. How can handle it?

    C J L 3 Replies Last reply
    0
    • S Susuko

      I want to give at the user this possibility. How can handle it?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Susuko wrote:

      how to handle history (Edit>Undo Redo)

      There is no single correct answer for this. It really depends on what you are trying to do. The best advice I can offer is to say that you need to implement the Memento pattern. See books such as Design Patterns in C# by Steven John Metsker (Pages 197-209). Or search online for details of this pattern.


      Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

      1 Reply Last reply
      0
      • S Susuko

        I want to give at the user this possibility. How can handle it?

        J Offline
        J Offline
        Jun Du
        wrote on last edited by
        #3

        Search this site for "undo". Here are some results: http://www.codeproject.com/docview/undo.asp[^] http://www.codeproject.com/csharp/undo_support.asp[^] http://www.codeproject.com/csharp/undoredobuffer.asp[^] http://www.codeproject.com/csharp/pcobjectundo.asp[^] - It's easier to make than to correct a mistake.

        1 Reply Last reply
        0
        • S Susuko

          I want to give at the user this possibility. How can handle it?

          L Offline
          L Offline
          LongRange Shooter
          wrote on last edited by
          #4

          You may want to look into the Memento Design Pattern as this design is exactly for the Do/Undo/Redo ability.

          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