Ejemplo n.º 1
0
        public void update(GenericIdeationObjects.IdeationUnit idea)
        {
            Bitmap bmpContent = PostItNote.DeepClone(idea.Content) as Bitmap;

            updateDisplayedContent(bmpContent);
            this.Tag = idea;
        }
Ejemplo n.º 2
0
 public void AddDiscardedIdea(GenericIdeationObjects.IdeationUnit idea)
 {
     try
     {
         IPostItUI addedIdeaUI = null;
         if (idea is PostItNote)
         {
             PostItNote castNote = (PostItNote)idea;
             if (castNote.Content is Bitmap)
             {
                 ImageBasedPostItUI noteUI = new ImageBasedPostItUI();
                 noteUI.Tag = idea;
                 noteUI.setNoteID(castNote.Id);
                 noteUI.updateDisplayedContent(((Bitmap)castNote.Content).Clone());
                 noteUI.Width = noteUI.Height = this.Height * 2 / 3;
                 noteUI.DisableZoomButtons();
                 addedIdeaUI = noteUI;
             }
         }
         if (addedIdeaUI != null)
         {
             addedIdeaUI.noteUIDeletedEventHandler += new NoteUIDeletedEvent(ideaUI_noteUIDeletedEventHandler);
             this.discardedItemsContainer.Children.Add((UserControl)addedIdeaUI);
         }
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
 }
Ejemplo n.º 3
0
 public void update(GenericIdeationObjects.IdeationUnit idea)
 {
     if (idea is GenericIdeationObjects.IdeationUnitGroup)
     {
         GenericIdeationObjects.IdeaGroupContentType groupContent = (GenericIdeationObjects.IdeaGroupContentType)idea.Content;
         updateDisplayedContent(groupContent.DisplayBoundaries);
     }
 }
Ejemplo n.º 4
0
 public void RestoreIdeaInBackground(GenericIdeationObjects.IdeationUnit toBeRestored)
 {
     GenericIdeationObjects.IdeationUnit idea = getIdeaById(toBeRestored.Id);
     if (idea != null)
     {
         discardedIdeas.Remove(idea);
     }
 }
Ejemplo n.º 5
0
 public void ReceiveDiscardedIdea(GenericIdeationObjects.IdeationUnit toBeDiscarded)
 {
     discardedIdeas.Add(toBeDiscarded);
     if (discardedIdeaReceivedEventHandler != null)
     {
         discardedIdeaReceivedEventHandler(toBeDiscarded);
     }
 }
Ejemplo n.º 6
0
        void container_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            GenericIdeationObjects.IdeationUnit associatedIdea = (GenericIdeationObjects.IdeationUnit) this.Tag;
            ScatterViewItem container = (ScatterViewItem)sender;

            if (noteUITranslatedEventHandler != null)
            {
                noteUITranslatedEventHandler(this, (GenericIdeationObjects.IdeationUnit) this.Tag, (float)container.Center.X, (float)container.Center.Y);
            }
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        public static string getLogStr_NoteMoved(GenericIdeationObjects.IdeationUnit idea)
        {
            string logStr      = "";
            string addedTime   = DateTime.Now.ToString("HH:mm:ss.ff");
            string id          = idea.Id.ToString();
            string objectType  = "Note";
            string commandType = "Moved";

            logStr = string.Format("{0};{1};{2};{3};{4};{5}", addedTime, id, objectType, commandType, idea.CenterX, idea.CenterY);
            return(logStr);
        }
Ejemplo n.º 9
0
 public void RestoreIdea(GenericIdeationObjects.IdeationUnit toBeRestored)
 {
     GenericIdeationObjects.IdeationUnit idea = getIdeaById(toBeRestored.Id);
     if (idea != null)
     {
         discardedIdeas.Remove(idea);
         if (discardedIdeaRestoredEventHandler != null)
         {
             discardedIdeaRestoredEventHandler(toBeRestored);
         }
     }
 }
Ejemplo n.º 10
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.º 11
0
 public GenericIdeationObjects.IdeationUnit getIdeaById(int id)
 {
     GenericIdeationObjects.IdeationUnit idea = null;
     for (int i = 0; i < discardedIdeas.Count; i++)
     {
         if (discardedIdeas[i].Id == id)
         {
             idea = discardedIdeas[i];
             break;
         }
     }
     return(idea);
 }
Ejemplo n.º 12
0
 void ideaUI_noteUIDeletedEventHandler(object sender, GenericIdeationObjects.IdeationUnit associatedIdea)
 {
     try
     {
         IPostItUI noteToRestore = getIdeaUIWithId(associatedIdea.Id);
         if (noteToRestore != null)
         {
             discardedItemsContainer.Children.Remove((Control)noteToRestore);
             if (noteRestoredEventHandler != null)
             {
                 noteRestoredEventHandler(associatedIdea);
             }
         }
     }
     catch (Exception ex)
     {
         Utilities.UtilitiesLib.LogError(ex);
     }
 }
Ejemplo n.º 13
0
 public void ReceiveDiscardedIdeaInBackground(GenericIdeationObjects.IdeationUnit toBeDiscarded)
 {
     discardedIdeas.Add(toBeDiscarded);
 }