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(); }
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(); } }
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(); } }
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(); }