/// <summary> /// Constructs a TableOfContentMatch to marshal changes from one table of /// contents to the other /// </summary> /// <param name="sender">The event quene for async calls</param> /// <param name="srcDeck">The source deck</param> /// <param name="destDeck">The dest deck</param> public TableOfContentsMatch( EventQueue sender, DeckModel srcDeck, DeckModel destDeck ) { this.m_Sender = sender; this.m_SrcDeck = srcDeck; this.m_DestDeck = destDeck; this.m_SourceEntriesCollectionHelper = new EntriesCollectionHelper( this ); }
public TableOfContentsNetworkService(SendingQueue sender, PresentationModel presentation, DeckModel deck) { this.m_Sender = sender; this.m_Presentation = presentation; this.m_Deck = deck; this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this); }
/// <summary> /// Constructs a TableOfContentMatch to marshal changes from one table of /// contents to the other /// </summary> /// <param name="sender">The event quene for async calls</param> /// <param name="srcDeck">The source deck</param> /// <param name="destDeck">The dest deck</param> public TableOfContentsMatch(EventQueue sender, DeckModel srcDeck, DeckModel destDeck) { this.m_Sender = sender; this.m_SrcDeck = srcDeck; this.m_DestDeck = destDeck; this.m_SourceEntriesCollectionHelper = new EntriesCollectionHelper(this); }
public TableOfContentsNetworkService(SendingQueue sender, PresentationModel presentation, DeckModel deck) { this.m_Sender = sender; this.m_Presentation = presentation; this.m_Deck = deck; this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this); }
public DeckUndoService(EventQueue dispatcher, UndoModel undo, DeckModel deck) { this.m_EventQueue = dispatcher; this.m_Undo = undo; this.m_Deck = deck; this.m_DeckChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleDeckChanged)); this.m_Deck.Changed["HumanName"].Add(this.m_DeckChangedDispatcher.Dispatcher); this.m_Deck.TableOfContents.Changed["Entries"].Add(this.m_DeckChangedDispatcher.Dispatcher); this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this); }
public DeckUndoService(EventQueue dispatcher, UndoModel undo, DeckModel deck) { this.m_EventQueue = dispatcher; this.m_Undo = undo; this.m_Deck = deck; this.m_DeckChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleDeckChanged)); this.m_Deck.Changed["HumanName"].Add(this.m_DeckChangedDispatcher.Dispatcher); this.m_Deck.TableOfContents.Changed["Entries"].Add(this.m_DeckChangedDispatcher.Dispatcher); this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this); }
private Rectangle m_VirtualSize; // The bounds containing all the child controls of this one #endregion Fields #region Constructors /// <summary> /// Constructs a new Filmstrip /// </summary> /// <param name="traversal"></param> /// <param name="model"></param> public MultiColumnFilmStrip(DeckTraversalModel traversal, PresenterModel model) { this.m_Model = model; this.m_DeckTraversal = traversal; this.m_EventQueue = new ControlEventQueue(this); // Create a new deck traversal to handle to keep track of the current slide that the mouse is over this.m_PreviewDeckTraversal = new SlideDeckTraversalModel(Guid.NewGuid(), traversal.Deck); this.AutoScroll = true; // Make the default width a little wider. this.Width = this.Width * 3 / 2; // Make the default back color a little prettier. this.BackColor = SystemColors.Window; // Set a sunken border around the FilmStrip and its scroll bar(s). this.BorderStyle = BorderStyle.Fixed3D; this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this); this.ContextMenu = new FilmStripContextMenu(traversal, model); // AutoScroll and SlidePreview Timers Init this.m_SlideLeaveTimer = new System.Windows.Forms.Timer(); this.m_SlideLeaveTimer.Tick += new EventHandler(HandleSlideLeaveTimerTick); this.m_SlideLeaveTimer.Interval = 100; /// This timer gets stopped and started a lot when the user hovers the mouse over the filmstrip. /// All the Stop/Start cycles incur a lot of overhead when running under Vista. The "fix" is to /// use System.Timers.Timer which does not incur the overhead. this.m_LongPauseTimer = new System.Timers.Timer(); this.m_LongPauseTimer.Elapsed += new System.Timers.ElapsedEventHandler(HandleLongPause); this.m_LongPauseTimer.Interval = 5000; this.m_LongPauseTimer.SynchronizingObject = this; this.m_AutoScrollDownTimer = new System.Windows.Forms.Timer(); this.m_AutoScrollDownTimer.Tick += new EventHandler(HandleAutoScrollDown); this.m_AutoScrollDownTimer.Interval = 100; this.m_AutoScrollUpTimer = new System.Windows.Forms.Timer(); this.m_AutoScrollUpTimer.Tick += new EventHandler(HandleAutoScrollUp); this.m_AutoScrollUpTimer.Interval = 100; //Attach property listeners to the filmstrip's width this.m_FilmStripWidthListener = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.OnFilmStripWidthChanged)); this.m_Model.ViewerState.Changed["FilmStripWidth"].Add(this.m_FilmStripWidthListener.Dispatcher); this.m_FilmStripWidthListener.Dispatcher(this, null); //Attach property listeners to the Student Submission filmstrip's width this.m_SSFilmStripWidthListener = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.OnSSFilmStripWidthChanged)); this.m_Model.ViewerState.Changed["SSFilmStripWidth"].Add(this.m_SSFilmStripWidthListener.Dispatcher); this.m_SSFilmStripWidthListener.Dispatcher(this, null); // Set the number of columns based on deck type. // Student Submission decks have more columns so the instructor // can more easily scroll through dozens of submissions. if ((traversal.Deck.Disposition & DeckDisposition.StudentSubmission) != 0) this.m_NumColumns = 3; else this.m_NumColumns = 1; }
/// <summary> /// Constructs a new Filmstrip /// </summary> /// <param name="traversal"></param> /// <param name="model"></param> public MultiColumnFilmStrip(DeckTraversalModel traversal, PresenterModel model) { this.m_Model = model; this.m_DeckTraversal = traversal; this.m_EventQueue = new ControlEventQueue(this); // Create a new deck traversal to handle to keep track of the current slide that the mouse is over this.m_PreviewDeckTraversal = new SlideDeckTraversalModel(Guid.NewGuid(), traversal.Deck); this.AutoScroll = true; // Make the default width a little wider. this.Width = this.Width * 3 / 2; // Make the default back color a little prettier. this.BackColor = SystemColors.Window; // Set a sunken border around the FilmStrip and its scroll bar(s). this.BorderStyle = BorderStyle.Fixed3D; this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this); this.ContextMenu = new FilmStripContextMenu(traversal, model); // AutoScroll and SlidePreview Timers Init this.m_SlideLeaveTimer = new System.Windows.Forms.Timer(); this.m_SlideLeaveTimer.Tick += new EventHandler(HandleSlideLeaveTimerTick); this.m_SlideLeaveTimer.Interval = 100; /// This timer gets stopped and started a lot when the user hovers the mouse over the filmstrip. /// All the Stop/Start cycles incur a lot of overhead when running under Vista. The "fix" is to /// use System.Timers.Timer which does not incur the overhead. this.m_LongPauseTimer = new System.Timers.Timer(); this.m_LongPauseTimer.Elapsed += new System.Timers.ElapsedEventHandler(HandleLongPause); this.m_LongPauseTimer.Interval = 5000; this.m_LongPauseTimer.SynchronizingObject = this; this.m_AutoScrollDownTimer = new System.Windows.Forms.Timer(); this.m_AutoScrollDownTimer.Tick += new EventHandler(HandleAutoScrollDown); this.m_AutoScrollDownTimer.Interval = 100; this.m_AutoScrollUpTimer = new System.Windows.Forms.Timer(); this.m_AutoScrollUpTimer.Tick += new EventHandler(HandleAutoScrollUp); this.m_AutoScrollUpTimer.Interval = 100; //Attach property listeners to the filmstrip's width this.m_FilmStripWidthListener = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.OnFilmStripWidthChanged)); this.m_Model.ViewerState.Changed["FilmStripWidth"].Add(this.m_FilmStripWidthListener.Dispatcher); this.m_FilmStripWidthListener.Dispatcher(this, null); //Attach property listeners to the Student Submission filmstrip's width this.m_SSFilmStripWidthListener = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.OnSSFilmStripWidthChanged)); this.m_Model.ViewerState.Changed["SSFilmStripWidth"].Add(this.m_SSFilmStripWidthListener.Dispatcher); this.m_SSFilmStripWidthListener.Dispatcher(this, null); // Set the number of columns based on deck type. // Student Submission decks have more columns so the instructor // can more easily scroll through dozens of submissions. if ((traversal.Deck.Disposition & DeckDisposition.StudentSubmission) != 0) { this.m_NumColumns = 3; } else { this.m_NumColumns = 1; } }