コード例 #1
0
 public static MapLayersWindow GetInstance()
 {
     if (_instance == null)
     {
         _instance = new MapLayersWindow();
     }
     return(_instance);
 }
コード例 #2
0
        private void Cleanup()
        {
            if (MapWindowManager.MapLayersHandler != null)
            {
                MapWindowManager.MapLayersViewModel.LayerRead    -= MapLayersViewModel_LayerRead;
                MapWindowManager.MapLayersViewModel.LayerRemoved -= MapLayersViewModel_LayerRemoved;
                MapWindowManager.MapLayersViewModel.CurrentLayer -= MapLayersViewModel_CurrentLayer;
            }

            dataGridLayers.SelectionChanged   -= DataGridLayers_SelectionChanged;
            dataGridLayers.DataContextChanged -= DataGridLayers_DataContextChanged;
            dataGridLayers.PreviewDrop        -= DataGridLayers_PreviewDrop;
            dataGridLayers.PreviewMouseDown   -= DataGridLayers_PreviewMouseDown;
            dataGridLayers.LayoutUpdated      -= DataGridLayers_LayoutUpdated;

            ParentForm.Closing -= ParentForm_Closing;

            MapLayersHandler.OnLayerVisibilityChanged -= MapLayersHandler_OnLayerVisibilityChanged;

            _instance = null;
            MapWindowManager.MapLayersWindow = null;
            this.SavePlacement();
        }
コード例 #3
0
 private void OnWindowClosed(object sender, EventArgs e)
 {
     _instance = null;
 }