Exemple #1
0
 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();
 }
Exemple #2
0
 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();
 }
Exemple #3
0
        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();
        }