Exemplo n.º 1
0
        public void InitLibControls()
        {
            typesForm.ucTypes.BuildTypesTree();
            layersForm.ucLayers.UpdateList();
            viewsForm.ucViews.UpdateList();
            searchForm.ucSearch.UpdateTypes();
            backgroundForm.ucBg.UpdateList();

            InitScaleCombo();

            app.ShowProperties(null);

            if (app.HasLib)
            {
                if (!dockPanelLoaded)
                {
                    try
                    {
                        DockPanelUtils.LoadFromXml(App.DockPanelConfigFilePath, dockPanel, m_deserializeDockContent);
                    }
                    catch (Exception ex)
                    {
                        Log.Exception(ex);
                        SetDefaultLayout();
                    }
                    finally
                    {
                        dockPanelLoaded = true;
                    }
                }
            }

            foreach (DockContent dc in dockPanels)
            {
                if (dc.DockState != DockState.Unknown)
                {
                    if (app.HasLib)
                    {
                        dc.Show();
                    }
                    else
                    {
                        dc.Hide();
                    }
                }
            }

            if (app.HasLib)
            {
                NewMapView(true);
            }

            UpdateLibControls();
//			this.btnSave.Visible=Lib!=null && !Lib.HasDb;
        }
Exemplo n.º 2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (app.SaveAndCloseLib())
         {
             if (dockPanelLoaded)
             {
                 DockPanelUtils.SaveAsXml(App.DockPanelConfigFilePath, dockPanel);
             }
         }
         else
         {
             e.Cancel = true;
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
 }
Exemplo n.º 3
0
 private void BackgroundForm_Load(object sender, EventArgs e)
 {
     DockPanelUtils.Localize(this);
 }
Exemplo n.º 4
0
 private void ViewsForm_Load(object sender, EventArgs e)
 {
     DockPanelUtils.Localize(this);
 }