private void updateNoteUIContent(GenericIdeationObjects.IdeationUnit updatedIdea)
 {
     this.Dispatcher.Invoke(new Action<IdeationUnit>((ideaToUpdate) =>
     {
         try
         {
             ScatterViewItem noteContainer = findNoteContainerOfIdea(ideaToUpdate);
             IPostItUI noteUI = (IPostItUI)noteContainer.Content;
             noteUI.update(ideaToUpdate);
             noteContainer.Content = noteUI;
         }
         catch (Exception ex)
         {
             Utilities.UtilitiesLib.LogError(ex);
         }
     }), new object[] { updatedIdea.Clone() });
 }
 private void updateNoteUIPosition(GenericIdeationObjects.IdeationUnit updatedIdea)
 {
     this.Dispatcher.Invoke(new Action<IdeationUnit>((ideaToUpdate) =>
     {
         try
         {
             ScatterViewItem noteContainer = findNoteContainerOfIdea(ideaToUpdate);
             if (noteContainer != null)
             {
                 noteContainer.Center = new System.Windows.Point(ideaToUpdate.CenterX, ideaToUpdate.CenterY);
                 Utilities.BrainstormingEventLogger.GetInstance(dropboxGeneralNoteDownloader.Storage).UploadLogString(Utilities.BrainstormingEventLogger.getLogStr_NoteMoved(ideaToUpdate));
             }
         }
         catch (Exception ex)
         {
             Utilities.UtilitiesLib.LogError(ex);
         }
     }), new object[] { updatedIdea });
 }
        private void brainstormManager_ideaUpdatedHandler(GenericIdeationObjects.IdeationUnit updatedIdea, GenericIdeationObjects.IdeationUnit.IdeaUpdateType updateType)
        {
            // lock (sync)
            {
                switch (updateType)
                {
                    case IdeationUnit.IdeaUpdateType.Position:
                        updateNoteUIPosition(updatedIdea);
                        break;

                    case IdeationUnit.IdeaUpdateType.Content:
                        updateNoteUIContent(updatedIdea);
                        break;
                }
                TakeASnapshot();
                switch (updateType)
                {
                    case IdeationUnit.IdeaUpdateType.Position:
                        timelineManager.AddUPDATEPositionChange(updatedIdea.Id, updatedIdea.CenterX, updatedIdea.CenterY);
                        break;

                    case IdeationUnit.IdeaUpdateType.Content:
                        timelineManager.AddUPDATEContentChange(updatedIdea.Id, updatedIdea.Content);
                        break;
                }
            }
        }
 private void brainstormManager_ideaRemovedHandler(GenericIdeationObjects.IdeationUnit removedIdea)
 {
     // lock (sync)
     {
         removeNoteUI(removedIdea);
         TakeASnapshot();
         timelineManager.AddDELETEChange(removedIdea.Id);
     }
 }
 private void brainstormManager_ideaAddedEventHandler(GenericIdeationObjects.IdeationUnit addedIdea)
 {
     // lock (sync)
     {
         List<IdeationUnit> oneItemList = new List<IdeationUnit>();
         oneItemList.Add(addedIdea);
         addNewIdeaUIs(oneItemList, true);
         TakeASnapshot();
         timelineManager.AddADDChange(addedIdea);
     }
 }
 public static string getLogStr_NoteDeleted(GenericIdeationObjects.IdeationUnit idea)
 {
     string logStr = "";
     string addedTime = DateTime.Now.ToString("HH:mm:ss.ff");
     string id = idea.Id.ToString();
     string objectType = "Note";
     string commandType = "Deleted";
     logStr = string.Format("{0};{1};{2};{3}", addedTime, id, objectType, commandType);
     return logStr;
 }
 public static string getLogStr_NoteSizeChanged(GenericIdeationObjects.IdeationUnit idea, float scaleX, float scaleY)
 {
     string logStr = "";
     string addedTime = DateTime.Now.ToString("HH:mm:ss.ff");
     string id = idea.Id.ToString();
     string objectType = "Note";
     string commandType = "Size";
     logStr = string.Format("{0};{1};{2};{3};{4};{5}",addedTime,id,objectType,commandType,scaleX.ToString(),scaleY.ToString());
     return logStr;
 }