private void btnSingleOK_Click(object sender, EventArgs e) { string name = xtraTabControl.SelectedTabPage.Name; IFeatureRender fRender; switch (name) { case "xtraTabSingle": pListColor = style.pListColor; fRender = new SingleRender(cmbSingleField.SelectedValue.ToString(), (IColor)pListColor[cmbSymSingle.SelectedIndex], Layer); ((SingleRender)fRender).axmapcontrol = axmapcontrol; ((SingleRender)fRender).axtoccontrol = axtoccontrol; fRender.LayerRender(); axmapcontrol.Extent = Layer.AreaOfInterest; break; case "xtraTabUnique": pListRamp = style.pListRamp; fRender = new OnlyRender(cmbOnlyField.SelectedValue.ToString(), (IColorRamp)pListRamp[cmbSymOnly.SelectedIndex], Layer); ((OnlyRender)fRender).axmapcontrol = axmapcontrol; ((OnlyRender)fRender).axtoccontrol = axtoccontrol; fRender.LayerRender(); axmapcontrol.Extent = Layer.AreaOfInterest; break; case "xtraTabClassfiy": pListRamp = style.pListRamp; string classname = cmbClassName.SelectedValue.ToString(); fRender = new ClassifyRender(Layer, cmbClassifyField.SelectedValue.ToString(), (IColorRamp)pListRamp[cmbSymClassify.SelectedIndex], Convert.ToInt32(cmbClassifyCount.SelectedValue.ToString()), classname); ((ClassifyRender)fRender).axmapcontrol = axmapcontrol; ((ClassifyRender)fRender).axtoccontrol = axtoccontrol; fRender.LayerRender(); axmapcontrol.Extent = Layer.AreaOfInterest; break; case "xtraTabProport": pListColor = style.pListColor; int size = Convert.ToInt32(cmbProSize.SelectedValue); fRender = new PropertonalRender(cmbProField.SelectedValue.ToString(), (IColor)pListColor[cmbSymPro.SelectedIndex], Layer, size); ((PropertonalRender)fRender).axmapcontrol = axmapcontrol; ((PropertonalRender)fRender).axtoccontrol = axtoccontrol; fRender.LayerRender(); axmapcontrol.Extent = Layer.AreaOfInterest; break; default: pListColor = style.pListColor; fRender = new SingleRender(cmbSingleField.SelectedValue.ToString(), (IColor)pListColor[cmbSymSingle.SelectedIndex], Layer); ((SingleRender)fRender).axmapcontrol = axmapcontrol; ((SingleRender)fRender).axtoccontrol = axtoccontrol; fRender.LayerRender(); axmapcontrol.Extent = Layer.AreaOfInterest; break; } this.Close(); }
private void btnSingleOK_Click(object sender, EventArgs e) { IFeatureRender fRender; pListColor = style.pListColor; fRender = new SingleRender(cmbSingleField.SelectedItem.ToString(), (IColor)pListColor[cmbSymSingle.SelectedIndex], Layer); ((SingleRender)fRender).axmapcontrol = axmapcontrol; ((SingleRender)fRender).axtoccontrol = axtoccontrol; fRender.LayerRender(); axmapcontrol.Extent = Layer.AreaOfInterest; }