Ejemplo n.º 1
0
        public void IntepretEvent(TimelineChange changeEvent)
        {
            switch (changeEvent.ChangeType)
            {
            case TypeOfChange.ADD:
                ExtractADDevent(changeEvent);
                break;

            case TypeOfChange.DELETE:
                ExtractREMOVEevent(changeEvent);
                break;

            case TypeOfChange.RESTORE:
                ExtractRESTOREevent(changeEvent);
                break;

            case TypeOfChange.UPDATE:
                ExtractUPDATEevent(changeEvent);
                break;

            case TypeOfChange.COLOR:
                ExtractCOLORChangeEvent(changeEvent);
                break;
            }
        }
Ejemplo n.º 2
0
 static TimelineChange extractUPDATECommandFromXmlNode(XmlElement node)
 {
     try
     {
         TimelineChange UPDATEchange = new TimelineChange();
         UPDATEchange.ChangeType    = TypeOfChange.UPDATE;
         UPDATEchange.ChangedIdeaID = Int32.Parse(node.Attributes["NoteID"].Value, CultureInfo.InvariantCulture);
         string updateType = node.Attributes["UpdateType"].Value;
         if (updateType.CompareTo("POS") == 0)
         {
             float X = float.Parse(node.Attributes["X"].Value, CultureInfo.InvariantCulture);
             float Y = float.Parse(node.Attributes["Y"].Value, CultureInfo.InvariantCulture);
             System.Windows.Point p = new System.Windows.Point(X, Y);
             UPDATEchange.MetaData = p;
         }
         else if (updateType.CompareTo("CONTENT") == 0)
         {
             string contentStr   = node.Attributes["Content"].Value;
             byte[] contentBytes = Convert.FromBase64String(contentStr);
             UPDATEchange.MetaData = Utilities.UtilitiesLib.BytesToBitmap(contentBytes);
         }
         return(UPDATEchange);
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return(null);
 }
Ejemplo n.º 3
0
 void ExtractCOLORChangeEvent(TimelineChange change)
 {
     if (COLORChangeEventExtractedHandler != null)
     {
         COLORChangeEventExtractedHandler(change.ChangedIdeaID, (string)change.MetaData);
     }
 }
Ejemplo n.º 4
0
 void ExtractRESTOREevent(TimelineChange changeEvent)
 {
     GenericIdeationObjects.IdeationUnit idea = new PostItObjects.PostItNote();
     idea.Id = changeEvent.ChangedIdeaID;
     if (REMOVEeventExtractedHandler != null)
     {
         RESTOREeventExtractedHandler(idea);
     }
 }
Ejemplo n.º 5
0
        public void AddDUPLICATEChange(int refFrameID)
        {
            TimelineChange change = new TimelineChange(TypeOfChange.DUPLICATE, refFrameID, null);
            TimelineFrame  frame  = new TimelineFrame();

            frame.Id     = getNextFrameID();
            frame.Change = change;
            AddFrame(frame);
        }
Ejemplo n.º 6
0
        public static TimelineFrame extractTimelineFrameFromXmlNode(XmlElement node)
        {
            TimelineFrame frame = new TimelineFrame();

            frame.Id = Int32.Parse(node.Attributes["ID"].Value, CultureInfo.InvariantCulture);
            TimelineChange change = TimelineChange.extractTimelineChangeFromXmlNode((XmlElement)node.FirstChild);

            frame.Change = change;
            return(frame);
        }
Ejemplo n.º 7
0
        public void AddUPDATEContentChange(int updatedNoteID, object newContent)
        {
            if (shouldAddDUPLICATEframe())
            {
                AddDUPLICATEChange(_currentFrame.Id);
            }
            TimelineChange change = new TimelineChange(TypeOfChange.UPDATE, updatedNoteID, newContent);
            TimelineFrame  frame  = new TimelineFrame();

            frame.Id     = getNextFrameID();
            frame.Change = change;
            AddFrame(frame);
        }
Ejemplo n.º 8
0
        public void AddCOLORChange(int noteID, string colorCode)
        {
            if (shouldAddDUPLICATEframe())
            {
                AddDUPLICATEChange(_currentFrame.Id);
            }
            TimelineChange change = new TimelineChange(TypeOfChange.COLOR, noteID, colorCode);
            TimelineFrame  frame  = new TimelineFrame();

            frame.Id     = getNextFrameID();
            frame.Change = change;
            AddFrame(frame);
        }
Ejemplo n.º 9
0
        public void AddADDChange(GenericIdeationObjects.IdeationUnit addedIdea)
        {
            if (shouldAddDUPLICATEframe())
            {
                AddDUPLICATEChange(_currentFrame.Id);
            }
            TimelineChange change = new TimelineChange(TypeOfChange.ADD, addedIdea.Id, addedIdea.Content);
            TimelineFrame  frame  = new TimelineFrame();

            frame.Id     = getNextFrameID();
            frame.Change = change;
            AddFrame(frame);
        }
Ejemplo n.º 10
0
        public void AddDELETEChange(int deletedIdeaID)
        {
            if (shouldAddDUPLICATEframe())
            {
                AddDUPLICATEChange(_currentFrame.Id);
            }
            TimelineChange change = new TimelineChange(TypeOfChange.DELETE, deletedIdeaID, null);
            TimelineFrame  frame  = new TimelineFrame();

            frame.Id     = getNextFrameID();
            frame.Change = change;
            AddFrame(frame);
        }
Ejemplo n.º 11
0
        public void AddRESTOREChange(int restoredIdeaID)
        {
            if (shouldAddDUPLICATEframe())
            {
                AddDUPLICATEChange(_currentFrame.Id);
            }
            TimelineChange change = new TimelineChange(TypeOfChange.RESTORE, restoredIdeaID, null);
            TimelineFrame  frame  = new TimelineFrame();

            frame.Id     = getNextFrameID();
            frame.Change = change;
            AddFrame(frame);
        }
Ejemplo n.º 12
0
        public void AddUPDATEPositionChange(int updaptedNoteID, double newX, double newY)
        {
            if (shouldAddDUPLICATEframe())
            {
                AddDUPLICATEChange(_currentFrame.Id);
            }
            System.Windows.Point newCenter = new System.Windows.Point(newX, newY);
            TimelineChange       change    = new TimelineChange(TypeOfChange.UPDATE, updaptedNoteID, newCenter);
            TimelineFrame        frame     = new TimelineFrame();

            frame.Id     = getNextFrameID();
            frame.Change = change;
            AddFrame(frame);
        }
Ejemplo n.º 13
0
 static TimelineChange extractDUPLICATECommandFromXmlNode(XmlElement node)
 {
     try
     {
         TimelineChange DUPLchange = new TimelineChange();
         DUPLchange.ChangeType    = TypeOfChange.DUPLICATE;
         DUPLchange.ChangedIdeaID = Int32.Parse(node.Attributes["RefID"].Value, CultureInfo.InvariantCulture);
         return(DUPLchange);
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return(null);
 }
Ejemplo n.º 14
0
 static TimelineChange extractCOLORCommandFromXmlNode(XmlElement node)
 {
     try
     {
         TimelineChange COLORchange = new TimelineChange();
         COLORchange.ChangeType    = TypeOfChange.DELETE;
         COLORchange.ChangedIdeaID = Int32.Parse(node.Attributes["NoteID"].Value, CultureInfo.InvariantCulture);
         COLORchange.MetaData      = node.Attributes["Color"].Value;
         return(COLORchange);
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return(null);
 }
Ejemplo n.º 15
0
 void ExtractADDevent(TimelineChange changeEvent)
 {
     GenericIdeationObjects.IdeationUnit idea = new PostItObjects.PostItNote();
     //this is a short-term solution, in the future need to re-implemented more sustainably
     if (changeEvent.MetaData is StrokeData)//this is the addition of a stroke
     {
         idea = new PostItObjects.StrokeBasedIdea();
     }
     idea.Id      = changeEvent.ChangedIdeaID;
     idea.CenterX = 0;
     idea.CenterY = 0;
     idea.Content = changeEvent.MetaData;
     if (ADDeventExtractedHandler != null)
     {
         ADDeventExtractedHandler(idea);
     }
 }
Ejemplo n.º 16
0
        static XmlElement getADDCommandXml(TimelineChange change, XmlElement parentNode)
        {
            /*
             * Xml node structure
             * <ADD NoteID=" " ContentType="[BITMAP/STROKE/GROUP]" Content=" "/>
             */

            try
            {
                XmlElement   node       = parentNode.OwnerDocument.CreateElement(change.getChangeTypeString());
                XmlAttribute ideaIDAttr = parentNode.OwnerDocument.CreateAttribute("NoteID");
                ideaIDAttr.Value = change.ChangedIdeaID.ToString();
                node.Attributes.Append(ideaIDAttr);
                XmlAttribute ideaContentTypeAttr = parentNode.OwnerDocument.CreateAttribute("ContentType");
                XmlAttribute ideaContentAttr     = parentNode.OwnerDocument.CreateAttribute("Content");
                if (change.MetaData is Bitmap)
                {
                    ideaContentTypeAttr.Value = "BITMAP";
                    ideaContentAttr.Value     = PostItObjects.PostItNote.getDatatStringOfIdeaContent(change.MetaData);
                }
                else if (change.MetaData is List <int> )
                {
                    ideaContentAttr.Value = "GROUP";
                }
                else if (change.MetaData is StrokeData)
                {
                    ideaContentTypeAttr.Value = "STROKE";
                    ideaContentAttr.Value     = (change.MetaData as StrokeData).getStringFromStrokePoints();
                    XmlAttribute isErasingAttr = parentNode.OwnerDocument.CreateAttribute("IsErasing");
                    isErasingAttr.Value = (change.MetaData as StrokeData).getStringOfIsErasingAttribute();
                    node.Attributes.Append(isErasingAttr);
                    XmlAttribute strokeColorAttr = parentNode.OwnerDocument.CreateAttribute("Color");
                    strokeColorAttr.Value = (change.MetaData as StrokeData).StrokeColorCode;
                    node.Attributes.Append(strokeColorAttr);
                }
                node.Attributes.Append(ideaContentTypeAttr);
                node.Attributes.Append(ideaContentAttr);
                return(node);
            }
            catch (Exception ex)
            {
                Utilities.UtilitiesLib.LogError(ex);
            }
            return(null);
        }
Ejemplo n.º 17
0
        static XmlElement getUPDATECommandXml(TimelineChange change, XmlElement parentNode)
        {
            /*
             * Xml structure
             * if update position
             * <UPDATE NoteID=" " UpdateType="POS" X=" " Y=" " />
             * if update content
             * <UPDATE NoteID=" " UpdateType="CONTENT" Content=" " />
             */
            try
            {
                XmlElement   node       = parentNode.OwnerDocument.CreateElement(change.getChangeTypeString());
                XmlAttribute ideaIDAttr = parentNode.OwnerDocument.CreateAttribute("NoteID");
                ideaIDAttr.Value = change.ChangedIdeaID.ToString();
                node.Attributes.Append(ideaIDAttr);
                XmlAttribute updateTypeAttr = parentNode.OwnerDocument.CreateAttribute("UpdateType");
                updateTypeAttr.Value = getUpdateTypeString(change.MetaData);
                node.Attributes.Append(updateTypeAttr);
                if (updateTypeAttr.Value.CompareTo("POS") == 0)
                {
                    System.Windows.Point newPos   = (System.Windows.Point)change.MetaData;
                    XmlAttribute         posXAttr = parentNode.OwnerDocument.CreateAttribute("X");
                    posXAttr.Value = newPos.X.ToString();
                    node.Attributes.Append(posXAttr);

                    XmlAttribute posYAttr = parentNode.OwnerDocument.CreateAttribute("Y");
                    posYAttr.Value = newPos.Y.ToString();
                    node.Attributes.Append(posYAttr);
                }
                else if (updateTypeAttr.Value.CompareTo("CONTENT") == 0)
                {
                    XmlAttribute contentAttr = parentNode.OwnerDocument.CreateAttribute("Content");
                    contentAttr.Value = PostItObjects.PostItNote.getDatatStringOfIdeaContent(change.MetaData);
                    node.Attributes.Append(contentAttr);
                }
                return(node);
            }
            catch (Exception ex)
            {
                Utilities.UtilitiesLib.LogError(ex);
            }
            return(null);
        }
Ejemplo n.º 18
0
 static XmlElement getDUPLICATECommandXml(TimelineChange change, XmlElement parentNode)
 {
     /*
      * Xml structure
      * <DUPLICATE RefID=" "/>
      */
     try
     {
         XmlElement   node      = parentNode.OwnerDocument.CreateElement(change.getChangeTypeString());
         XmlAttribute refIDAttr = parentNode.OwnerDocument.CreateAttribute("RefID");
         refIDAttr.Value = change.ChangedIdeaID.ToString();
         node.Attributes.Append(refIDAttr);
         return(node);
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return(null);
 }
Ejemplo n.º 19
0
 void ExtractUPDATEevent(TimelineChange changeEvent)
 {
     if (changeEvent.MetaData is Point)
     {
         if (UPDATEPosEventExtractedHandler != null)
         {
             Point newPos = (Point)changeEvent.MetaData;
             UPDATEPosEventExtractedHandler(changeEvent.ChangedIdeaID, (float)newPos.X, (float)newPos.Y);
         }
     }
     else
     {
         if (UPDATEContentEventExtractedHandler != null)
         {
             GenericIdeationObjects.IdeationUnit idea = new PostItObjects.PostItNote();
             idea.Id      = changeEvent.ChangedIdeaID;
             idea.Content = changeEvent.MetaData;
             UPDATEContentEventExtractedHandler(idea);
         }
     }
 }
Ejemplo n.º 20
0
 static TimelineChange extractADDCommandFromXmlNode(XmlElement node)
 {
     try
     {
         TimelineChange ADDchange = new TimelineChange();
         ADDchange.ChangeType    = TypeOfChange.ADD;
         ADDchange.ChangedIdeaID = Int32.Parse(node.Attributes["NoteID"].Value, CultureInfo.InvariantCulture);
         string contentType = node.Attributes["ContentType"].Value;
         string contentStr  = node.Attributes["Content"].Value;
         if (contentStr.CompareTo("BITMAP") == 0)
         {
             byte[] contentBytes = Convert.FromBase64String(contentStr);
             ADDchange.MetaData = Utilities.UtilitiesLib.BytesToBitmap(contentBytes);
         }
         else if (contentStr.CompareTo("STROKE") == 0)
         {
             //ADDchange.MetaData = PostItObjects.StrokeBasedIdea.ParseContentFromString(contentStr);
             StrokeData strokeData = new StrokeData();
             strokeData.ParseStrokePointsFromString(contentStr);
             if (node.HasAttribute("IsErasing"))
             {
                 strokeData.ParseIsErasingFromString(node.Attributes["IsErasing"].Value);
             }
             if (node.HasAttribute("Color"))
             {
                 strokeData.StrokeColorCode = node.Attributes["Color"].Value;
             }
             ADDchange.MetaData = strokeData;
         }
         else if (contentStr.CompareTo("GROUP") == 0)
         {
         }
         return(ADDchange);
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return(null);
 }
Ejemplo n.º 21
0
 static XmlElement getCOLORCommandXml(TimelineChange change, XmlElement parentNode)
 {
     /*
      * Xml node structure
      * <COLOR NoteID=" "  Color=" "/>
      */
     try
     {
         XmlElement   node       = parentNode.OwnerDocument.CreateElement(change.getChangeTypeString());
         XmlAttribute ideaIDAttr = parentNode.OwnerDocument.CreateAttribute("NoteID");
         ideaIDAttr.Value = change.ChangedIdeaID.ToString();
         node.Attributes.Append(ideaIDAttr);
         XmlAttribute colorAttr = parentNode.OwnerDocument.CreateAttribute("Color");
         colorAttr.Value = (string)change.MetaData;
         node.Attributes.Append(colorAttr);
         return(node);
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return(null);
 }
Ejemplo n.º 22
0
        static TimelineChange extractADDCommandFromXmlNode(XmlElement node)
        {
            try
            {
                TimelineChange ADDchange = new TimelineChange();
                ADDchange.ChangeType = TypeOfChange.ADD;
                ADDchange.ChangedIdeaID = Int32.Parse(node.Attributes["NoteID"].Value, CultureInfo.InvariantCulture);
                string contentType = node.Attributes["ContentType"].Value;
                string contentStr = node.Attributes["Content"].Value;
                if (contentStr.CompareTo("BITMAP") == 0)
                {
                    byte[] contentBytes = Convert.FromBase64String(contentStr);
                    ADDchange.MetaData = Utilities.UtilitiesLib.BytesToBitmap(contentBytes);
                }
                else if (contentStr.CompareTo("STROKE") == 0)
                {
                    //ADDchange.MetaData = PostItObjects.StrokeBasedIdea.ParseContentFromString(contentStr);
                    StrokeData strokeData = new StrokeData();
                    strokeData.ParseStrokePointsFromString(contentStr);
                    if (node.HasAttribute("IsErasing"))
                    {
                        strokeData.ParseIsErasingFromString(node.Attributes["IsErasing"].Value);
                    }
                    if (node.HasAttribute("Color"))
                    {
                        strokeData.StrokeColorCode = node.Attributes["Color"].Value;
                    }
                    ADDchange.MetaData = strokeData;
                }
                else if (contentStr.CompareTo("GROUP") == 0)
                {

                }
                return ADDchange;
            }
            catch (Exception ex)
            {
                Utilities.UtilitiesLib.LogError(ex);
            }
            return null;
        }
Ejemplo n.º 23
0
 static TimelineChange extractCOLORCommandFromXmlNode(XmlElement node)
 {
     try
     {
         TimelineChange COLORchange = new TimelineChange();
         COLORchange.ChangeType = TypeOfChange.DELETE;
         COLORchange.ChangedIdeaID = Int32.Parse(node.Attributes["NoteID"].Value, CultureInfo.InvariantCulture);
         COLORchange.MetaData = node.Attributes["Color"].Value;
         return COLORchange;
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return null;
 }
Ejemplo n.º 24
0
        static XmlElement getUPDATECommandXml(TimelineChange change, XmlElement parentNode)
        {
            /*
             * Xml structure
             * if update position
             * <UPDATE NoteID=" " UpdateType="POS" X=" " Y=" " />
             * if update content
             * <UPDATE NoteID=" " UpdateType="CONTENT" Content=" " />
             */
            try
            {
                XmlElement node = parentNode.OwnerDocument.CreateElement(change.getChangeTypeString());
                XmlAttribute ideaIDAttr = parentNode.OwnerDocument.CreateAttribute("NoteID");
                ideaIDAttr.Value = change.ChangedIdeaID.ToString();
                node.Attributes.Append(ideaIDAttr);
                XmlAttribute updateTypeAttr = parentNode.OwnerDocument.CreateAttribute("UpdateType");
                updateTypeAttr.Value = getUpdateTypeString(change.MetaData);
                node.Attributes.Append(updateTypeAttr);
                if (updateTypeAttr.Value.CompareTo("POS") == 0)
                {
                    System.Windows.Point newPos = (System.Windows.Point)change.MetaData;
                    XmlAttribute posXAttr = parentNode.OwnerDocument.CreateAttribute("X");
                    posXAttr.Value = newPos.X.ToString();
                    node.Attributes.Append(posXAttr);

                    XmlAttribute posYAttr = parentNode.OwnerDocument.CreateAttribute("Y");
                    posYAttr.Value = newPos.Y.ToString();
                    node.Attributes.Append(posYAttr);
                }
                else if (updateTypeAttr.Value.CompareTo("CONTENT") == 0)
                {
                    XmlAttribute contentAttr = parentNode.OwnerDocument.CreateAttribute("Content");
                    contentAttr.Value = PostItObjects.PostItNote.getDatatStringOfIdeaContent(change.MetaData);
                    node.Attributes.Append(contentAttr);
                }
                return node;
            }
            catch (Exception ex)
            {
                Utilities.UtilitiesLib.LogError(ex);
            }
            return null;
        }
Ejemplo n.º 25
0
 static XmlElement getRESTORECommandXml(TimelineChange change, XmlElement parentNode)
 {
     /*
      * Xml node structure
      * <RESTORE NoteID=" "/>
      */
     try
     {
         XmlElement node = parentNode.OwnerDocument.CreateElement(change.getChangeTypeString());
         XmlAttribute ideaIDAttr = parentNode.OwnerDocument.CreateAttribute("NoteID");
         ideaIDAttr.Value = change.ChangedIdeaID.ToString();
         node.Attributes.Append(ideaIDAttr);
         return node;
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return null;
 }
Ejemplo n.º 26
0
        static XmlElement getADDCommandXml(TimelineChange change, XmlElement parentNode)
        {
            /*
             * Xml node structure
             * <ADD NoteID=" " ContentType="[BITMAP/STROKE/GROUP]" Content=" "/>
             */

            try
            {
                XmlElement node = parentNode.OwnerDocument.CreateElement(change.getChangeTypeString());
                XmlAttribute ideaIDAttr = parentNode.OwnerDocument.CreateAttribute("NoteID");
                ideaIDAttr.Value = change.ChangedIdeaID.ToString();
                node.Attributes.Append(ideaIDAttr);
                XmlAttribute ideaContentTypeAttr = parentNode.OwnerDocument.CreateAttribute("ContentType");
                XmlAttribute ideaContentAttr = parentNode.OwnerDocument.CreateAttribute("Content");
                if (change.MetaData is Bitmap)
                {
                    ideaContentTypeAttr.Value = "BITMAP";
                    ideaContentAttr.Value = PostItObjects.PostItNote.getDatatStringOfIdeaContent(change.MetaData);
                }
                else if (change.MetaData is List<int>)
                {
                    ideaContentAttr.Value = "GROUP";
                }
                else if (change.MetaData is StrokeData)
                {

                    ideaContentTypeAttr.Value = "STROKE";
                    ideaContentAttr.Value = (change.MetaData as StrokeData).getStringFromStrokePoints();
                    XmlAttribute isErasingAttr = parentNode.OwnerDocument.CreateAttribute("IsErasing");
                    isErasingAttr.Value = (change.MetaData as StrokeData).getStringOfIsErasingAttribute();
                    node.Attributes.Append(isErasingAttr);
                    XmlAttribute strokeColorAttr = parentNode.OwnerDocument.CreateAttribute("Color");
                    strokeColorAttr.Value = (change.MetaData as StrokeData).StrokeColorCode;
                    node.Attributes.Append(strokeColorAttr);
                }
                node.Attributes.Append(ideaContentTypeAttr);
                node.Attributes.Append(ideaContentAttr);
                return node;
            }
            catch (Exception ex)
            {
                Utilities.UtilitiesLib.LogError(ex);
            }
            return null;
        }
Ejemplo n.º 27
0
 static TimelineChange extractUPDATECommandFromXmlNode(XmlElement node)
 {
     try
     {
         TimelineChange UPDATEchange = new TimelineChange();
         UPDATEchange.ChangeType = TypeOfChange.UPDATE;
         UPDATEchange.ChangedIdeaID = Int32.Parse(node.Attributes["NoteID"].Value, CultureInfo.InvariantCulture);
         string updateType = node.Attributes["UpdateType"].Value;
         if (updateType.CompareTo("POS") == 0)
         {
             float X = float.Parse(node.Attributes["X"].Value, CultureInfo.InvariantCulture);
             float Y = float.Parse(node.Attributes["Y"].Value, CultureInfo.InvariantCulture);
             System.Windows.Point p = new System.Windows.Point(X, Y);
             UPDATEchange.MetaData = p;
         }
         else if (updateType.CompareTo("CONTENT") == 0)
         {
             string contentStr = node.Attributes["Content"].Value;
             byte[] contentBytes = Convert.FromBase64String(contentStr);
             UPDATEchange.MetaData = Utilities.UtilitiesLib.BytesToBitmap(contentBytes);
         }
         return UPDATEchange;
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return null;
 }
Ejemplo n.º 28
0
 static TimelineChange extractRESTORECommandFromXmlNode(XmlElement node)
 {
     try
     {
         TimelineChange DELchange = new TimelineChange();
         DELchange.ChangeType = TypeOfChange.RESTORE;
         DELchange.ChangedIdeaID = Int32.Parse(node.Attributes["NoteID"].Value, CultureInfo.InvariantCulture);
         return DELchange;
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
     return null;
 }