public static ISimpleRenderer GetAOIRenderer(GCDCore.Project.Masks.AOIMask mask) { RgbColor rgb = new RgbColor(); rgb.Red = 255; rgb.Blue = 0; rgb.Green = 0; ISimpleFillSymbol symbol = new SimpleFillSymbol(); symbol.Style = esriSimpleFillStyle.esriSFSHollow; symbol.Outline.Width = 1.0; ILineSymbol pLineSymbol = symbol.Outline; pLineSymbol.Color = rgb; pLineSymbol.Width = 1; symbol.Outline = pLineSymbol; // These properties should be set prior to adding values ISimpleRenderer pRender = new SimpleRenderer(); pRender.Label = "Area of Interest"; pRender.Symbol = symbol as ISymbol; return(pRender); }
public void AddAOI(GCDCore.Project.Masks.AOIMask mask) { IGroupLayer pProjLyr = AddProjectGroupLayer(); IGroupLayer pGrpLayer = ArcMapUtilities.GetGroupLayer(MasksGroupLayer, pProjLyr); IFeatureRenderer pRenderer = VectorSymbolization.GetAOIRenderer(mask) as IFeatureRenderer; VectorSymbolization.AddToMapVector(mask.Vector.GISFileInfo, mask.Name, pGrpLayer, string.Empty, pRenderer, string.Empty, string.Empty); }
public BatchProps(Surface newSurface, ErrorSurface newError, Surface oldSurface, ErrorSurface oldError, GCDCore.Project.Masks.AOIMask aoiMask, ThresholdProps tProps) { NewSurface = newSurface; NewError = newError; OldSurface = oldSurface; OldError = oldError; AOIMask = aoiMask; ThresholdProps = tProps; }
private void cmdOK_Click(object sender, EventArgs e) { if (!ValidateForm()) { DialogResult = DialogResult.None; return; } try { Cursor = Cursors.WaitCursor; if (AOIMask == null) { FileInfo fiDestination = ProjectManager.Project.GetAbsolutePath(txtPath.Text); fiDestination.Directory.Create(); ucPolygon.SelectedItem.Copy(fiDestination); AOIMask = new GCDCore.Project.Masks.AOIMask(txtName.Text, fiDestination); ProjectManager.Project.Masks.Add(AOIMask); ProjectManager.AddNewProjectItemToMap(AOIMask); } else { AOIMask.Name = txtName.Text; } ProjectManager.Project.Save(); Cursor = Cursors.Default; MessageBox.Show("Area of interest mask saved successfully.", Properties.Resources.ApplicationNameLong, MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { DialogResult = DialogResult.None; GCDException.HandleException(ex, "Error saving area of interest mask."); } finally { Cursor = Cursors.Default; } }
public frmAOIProperties(GCDCore.Project.Masks.AOIMask aoi) { InitializeComponent(); AOIMask = aoi; }