void UpdateLayoutHandler(DocumentHandler handler) { if (layoutHandler != null) layoutHandler.SelectionChanged -= new EventHandler(layoutHandler_SelectionChanged); layoutHandler = handler.LayoutHandler; if (handler.IsLayoutable) layoutHandler.SelectionChanged += new EventHandler(layoutHandler_SelectionChanged); UpdateLayoutButtons(); }
void UpdateZoomHandler(DocumentHandler handler) { if (zoomHandler != null) zoomHandler.ZoomChanged -= new EventHandler(zoomHandler_ZoomChanged); zoomHandler = handler.ZoomHandler; if (handler.IsZoomable) zoomHandler.ZoomChanged += new EventHandler(zoomHandler_ZoomChanged); zoomingToolStrip.Enabled = handler.IsZoomable; zoomToolStripLabel.Enabled = handler.IsZoomable; autoZoomToolStripButton.Enabled = handler.IsZoomable; UpdateZoomValue(); }
void UpdateEditHandler(DocumentHandler handler) { if (editHandler != null) editHandler.EditStateChanged -= new EventHandler(editHandler_EditStateChanged); editHandler = handler.EditHandler; if (handler.IsEditable) editHandler.EditStateChanged += new EventHandler(editHandler_EditStateChanged); UpdateEditButtons(); }