src/Misc/EFTools/EntityDesignPackage/CustomCode/MicrosoftDataEntityDesignDocView_PanZoom.cs
/// <summary>
///     Handler for ZoomChanged event that will persist current zoom level when changed
/// </summary>
Handler for ZoomChanged event that will persist current zoom level when changed
Handler for ZoomChanged event that will persist current zoom level when changed
private void DiagramClientView_ZoomChanged(object sender, DiagramEventArgs e)
        {
            var diagram = CurrentDiagram as EntityDesignerDiagram;
            var docData = DocData as MicrosoftDataEntityDesignDocData;
            if (diagram == null
                || docData == null
                || !docData.IsModelDiagramLoaded)
            {
                return;
            }
            try
            {
                diagram.PersistZoomLevel();
            }
            catch (FileNotEditableException fileNotEditableException)
            {
                VsUtils.ShowErrorDialog(fileNotEditableException.Message);
            }
        }
private void DiagramClientView_ZoomChanged ( object sender , DiagramEventArgs e ) { var diagram = CurrentDiagram as EntityDesignerDiagram ; var docData = DocData as MicrosoftDataEntityDesignDocData ; if ( diagram == null || docData == null || ! docData . IsModelDiagramLoaded ) { return ; } try { diagram . PersistZoomLevel ( ) ; } catch ( FileNotEditableException fileNotEditableException ) { VsUtils . ShowErrorDialog ( fileNotEditableException . Message ) ; } }
Handler for ZoomChanged event that will persist current zoom level when changed
Handler for ZoomChanged event that will persist current zoom level when changed
// make sure that the Model Diagram has already been created or translated before persisting ZoomLevel
sender
object
e
DiagramEventArgs