private void btnshadowInfo_Click(object sender, EventArgs e) { IStyleGalleryItem selectStyleGalleryItem = this.cboBackground.GetSelectStyleGalleryItem(); IShadow item = null; if (selectStyleGalleryItem != null) { item = selectStyleGalleryItem.Item as IShadow; } if (item != null) { frmElementProperty property = new frmElementProperty(); ShadowSymbolPropertyPage page = new ShadowSymbolPropertyPage(); property.AddPage(page); if (property.EditProperties(item)) { this.bool_0 = false; selectStyleGalleryItem = this.cboShadow.GetStyleGalleryItemAt(this.cboShadow.Items.Count - 1); if (selectStyleGalleryItem != null) { if (selectStyleGalleryItem.Name == "<定制>") { selectStyleGalleryItem.Item = item; } else { selectStyleGalleryItem = new MyStyleGalleryItem { Name = "<定制>", Item = item }; this.cboShadow.Add(selectStyleGalleryItem); this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1; } } else { selectStyleGalleryItem = new MyStyleGalleryItem { Name = "<定制>", Item = item }; this.cboShadow.Add(selectStyleGalleryItem); this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1; } this.bool_0 = true; } } }
private void btnLegendItemsSelector_Click(object sender, EventArgs e) { IPropertySheet sheet = new frmElementProperty(); IPropertyPage page = new LegendItemArrangementPropertyPage(); sheet.AddPage(page); page = new LegendItemGeneralPropertyPage(); sheet.AddPage(page); ILegendItem legendItem = (this.listLegendLayers.SelectedItem as LegendItemObject).LegendItem; if (sheet.EditProperties(legendItem)) { this.method_2(); } }
private void btnBackgroundInfo_Click(object sender, EventArgs e) { if (this.ibackground_0 != null) { frmElementProperty property = new frmElementProperty(); BackgroundSymbolPropertyPage page = new BackgroundSymbolPropertyPage(); property.AddPage(page); if (property.EditProperties(this.ibackground_0)) { this.bool_0 = false; this.method_3(); IStyleGalleryItem styleGalleryItemAt = this.cboBorder.GetStyleGalleryItemAt(this.cboBorder.Items.Count - 1); if (styleGalleryItemAt != null) { if (styleGalleryItemAt.Name == "<定制>") { styleGalleryItemAt.Item = this.ibackground_0; } else { styleGalleryItemAt = new MyStyleGalleryItem { Name = "<定制>", Item = this.ibackground_0 }; this.cboBackground.Add(styleGalleryItemAt); this.cboBackground.SelectedIndex = this.cboBackground.Items.Count - 1; } } else { styleGalleryItemAt = new MyStyleGalleryItem { Name = "<定制>", Item = this.ibackground_0 }; this.cboBackground.Add(styleGalleryItemAt); this.cboBackground.SelectedIndex = this.cboBackground.Items.Count - 1; } this.bool_0 = true; this.method_0(); } } }
private void btnProperty_Click(object sender, EventArgs e) { if (this.checkedListBox1.SelectedIndex != -1) { int selectedIndex = this.checkedListBox1.SelectedIndex; IMapGrid mapGrid = (this.checkedListBox1.SelectedItem as MapGridWrap).MapGrid; frmElementProperty property = new frmElementProperty { Text = "参考系" }; IPropertyPage page = null; if (mapGrid is IProjectedGrid) { page = new GridAxisPropertyPage() as IPropertyPage; property.AddPage(page); page = new LabelFormatPropertyPage() as IPropertyPage; property.AddPage(page); page = new TickSymbolPropertyPage() as IPropertyPage; property.AddPage(page); page = new MeasureCoordinatePropertyPage() as IPropertyPage; property.AddPage(page); page = new MeasuredGridPropertyPage() as IPropertyPage; property.AddPage(page); } else if (mapGrid is IMgrsGrid) { page = new MGRSPropertyPage() as IPropertyPage; property.AddPage(page); page = new GridAxisPropertyPage() as IPropertyPage; property.AddPage(page); page = new LabelFormatPropertyPage() as IPropertyPage; property.AddPage(page); page = new TickSymbolPropertyPage() as IPropertyPage; property.AddPage(page); } else if (mapGrid is IGraticule) { page = new GridAxisPropertyPage() as IPropertyPage; property.AddPage(page); page = new GridInteriorLabelsPropertyPage() as IPropertyPage; property.AddPage(page); page = new LabelFormatPropertyPage() as IPropertyPage; property.AddPage(page); page = new TickSymbolPropertyPage() as IPropertyPage; property.AddPage(page); page = new GridHatchPropertyPage() as IPropertyPage; property.AddPage(page); page = new MeasuredGridPropertyPage() as IPropertyPage; property.AddPage(page); } else if (mapGrid is ICustomOverlayGrid) { page = new CustomOverlayGridPropertyPage() as IPropertyPage; property.AddPage(page); page = new GridAxisPropertyPage() as IPropertyPage; property.AddPage(page); page = new LabelFormatPropertyPage() as IPropertyPage; property.AddPage(page); page = new TickSymbolPropertyPage() as IPropertyPage; property.AddPage(page); } else if (mapGrid is IIndexGrid) { page = new GridAxisPropertyPage() as IPropertyPage; property.AddPage(page); page = new IndexGridProperyPage() as IPropertyPage; property.AddPage(page); page = new LabelFormatPropertyPage() as IPropertyPage; property.AddPage(page); page = new TickSymbolPropertyPage() as IPropertyPage; property.AddPage(page); } if (property.EditProperties(mapGrid)) { this.imapGrids_0.set_MapGrid(selectedIndex, mapGrid); } } }