コード例 #1
0
        private void DoNewMap()
        {
            ClearExistingEditor();

            var mdf  = Utility.CreateMapDefinition(_conn, Strings.NewMap);
            var diag = new MapSettingsDialog(_conn, mdf, null);

            //if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //Start off in the session, so the editor service knows this is a new resource
                mdf.ResourceID = "Session:" + _conn.SessionID + "//NewMap.MapDefinition";
                _conn.ResourceService.SaveResource(mdf);
                LoadMapDefinitionForEditing(mdf);
            }
            EvaluateCommandStates();
        }
コード例 #2
0
        private void btnMapProperties_Click(object sender, EventArgs e)
        {
            if (_mapEditor == null)
            {
                return;
            }

            _mapEditor.SyncMap();
            var diag = new MapSettingsDialog(_conn, _mapEditor.GetMapDefinition(), _mapEditor.Viewer);

            if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                CleanupExistingMap();
                _mapEditor.EditorService.SyncSessionCopy();
                _mapEditor.RebuildRuntimeMap();
                _bComputeLayerCsAndExtentOnFirstLayerAdded = _mapEditor.EditorService.IsNew;
                _mapEditor.Map.LayerAdded += OnMapLayerAdded;
                _mapEditor.ReloadViewer();
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: kanbang/Colt
        private void btnMapProperties_Click(object sender, EventArgs e)
        {
            if (_mapEditor == null)
                return;

            _mapEditor.SyncMap();
            var diag = new MapSettingsDialog(_conn, _mapEditor.GetMapDefinition(), _mapEditor.Viewer);
            if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                CleanupExistingMap();
                _mapEditor.EditorService.SyncSessionCopy();
                _mapEditor.RebuildRuntimeMap();
                _bComputeLayerCsAndExtentOnFirstLayerAdded = _mapEditor.EditorService.IsNew;
                _mapEditor.Map.LayerAdded += OnMapLayerAdded;
                _mapEditor.ReloadViewer();
            }
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: kanbang/Colt
        private void DoNewMap()
        {
            ClearExistingEditor();

            var mdf = ObjectFactory.CreateMapDefinition(_conn, Strings.NewMap);
            var diag = new MapSettingsDialog(_conn, mdf, null);
            //if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //Start off in the session, so the editor service knows this is a new resource
                mdf.ResourceID = "Session:" + _conn.SessionID + "//NewMap.MapDefinition";
                _conn.ResourceService.SaveResource(mdf);
                LoadMapDefinitionForEditing(mdf);
            }
            EvaluateCommandStates();
        }