private void txtPointValue_EditValueChanged(object sender, EventArgs e) { if (this.bool_0) { try { double num = double.Parse(this.txtPointValue.Text); double num2 = this.idotDensityRenderer_0.DotValue / num; this.idotDensityRenderer_0.DotValue = num; IDotDensityFillSymbol symbol = this.MinsymbolItem.Symbol as IDotDensityFillSymbol; IDotDensityFillSymbol symbol2 = this.MeansymbolItem.Symbol as IDotDensityFillSymbol; IDotDensityFillSymbol symbol3 = this.MaxsymbolItem.Symbol as IDotDensityFillSymbol; for (int i = 0; i < (symbol as ISymbolArray).SymbolCount; i++) { symbol.set_DotCount(i, (int)(symbol.get_DotCount(i) * num2)); symbol2.set_DotCount(i, (int)(symbol2.get_DotCount(i) * num2)); symbol3.set_DotCount(i, (int)(symbol3.get_DotCount(i) * num2)); } this.MinsymbolItem.Invalidate(); this.MeansymbolItem.Invalidate(); this.MaxsymbolItem.Invalidate(); } catch { } } }
private void btnSelect_Click(object sender, EventArgs e) { try { int num3; double num = 0.0; double num2 = double.Parse(this.txtSize.Text); ISymbolArray dotDensitySymbol = this.idotDensityRenderer_0.DotDensitySymbol as ISymbolArray; string[] strArray = new string[2]; for (num3 = this.FieldsListBoxCtrl.SelectedIndices.Count - 1; num3 >= 0; num3--) { int index = this.FieldsListBoxCtrl.SelectedIndices[num3]; (this.idotDensityRenderer_0 as IRendererFields).AddField( (this.FieldsListBoxCtrl.Items[index] as FieldWrap).Name, this.FieldsListBoxCtrl.Items[index].ToString()); IColor color = this.ienumColors_0.Next(); if (color == null) { this.ienumColors_0.Reset(); color = this.ienumColors_0.Next(); } ISymbol symbol = this.CreateMarkerSymbol(color, esriSimpleMarkerStyle.esriSMSCircle, num2) as ISymbol; strArray[0] = ""; strArray[1] = this.FieldsListBoxCtrl.Items[index].ToString(); ListViewItemEx ex = new ListViewItemEx(strArray) { Style = symbol, Tag = this.FieldsListBoxCtrl.Items[index] }; this.SelectFieldslistView.Add(ex); dotDensitySymbol.AddSymbol(symbol); this.FieldsListBoxCtrl.Items.RemoveAt(index); } IDotDensityFillSymbol symbol2 = (dotDensitySymbol as IClone).Clone() as IDotDensityFillSymbol; IDotDensityFillSymbol symbol3 = (dotDensitySymbol as IClone).Clone() as IDotDensityFillSymbol; IDotDensityFillSymbol symbol4 = (dotDensitySymbol as IClone).Clone() as IDotDensityFillSymbol; this.MinsymbolItem.Symbol = symbol2; this.MeansymbolItem.Symbol = symbol3; this.MaxsymbolItem.Symbol = symbol4; double[] numArray = new double[dotDensitySymbol.SymbolCount]; double[] numArray2 = new double[dotDensitySymbol.SymbolCount]; double[] numArray3 = new double[dotDensitySymbol.SymbolCount]; for (num3 = 0; num3 < dotDensitySymbol.SymbolCount; num3++) { double num5; double num6; double num7; this.GetStaticsValue((this.idotDensityRenderer_0 as IRendererFields).get_Field(num3), out num5, out num6, out num7); numArray[num3] = num5; numArray3[num3] = num6; numArray2[num3] = num7; if (num5 > 0.0) { if (num == 0.0) { num = num5; } else { num = (num < num5) ? num : num5; } } num = (num > this.idotDensityRenderer_0.DotValue) ? this.idotDensityRenderer_0.DotValue : num; if (num == 0.0) { num = 500.0; } this.txtPointValue.Text = num.ToString(); this.idotDensityRenderer_0.DotValue = num; } for (num3 = 0; num3 < numArray.Length; num3++) { symbol2.set_DotCount(num3, (int)(numArray[num3] / num)); symbol3.set_DotCount(num3, (int)(numArray3[num3] / num)); symbol4.set_DotCount(num3, (int)(numArray2[num3] / num)); } this.MinsymbolItem.Invalidate(); this.MeansymbolItem.Invalidate(); this.MaxsymbolItem.Invalidate(); } catch { } this.btnUnSelectAll.Enabled = true; }
private void method_0() { IFields fields2; int num; this.FieldsListBoxCtrl.Items.Clear(); this.SelectFieldslistView.Items.Clear(); IRendererFields fields = this.idotDensityRenderer_0 as IRendererFields; if (this.igeoFeatureLayer_0 is IDisplayTable) { fields2 = (this.igeoFeatureLayer_0 as IDisplayTable).DisplayTable.Fields; } else { fields2 = this.igeoFeatureLayer_0.FeatureClass.Fields; } this.colorRampComboBox1.Text = this.idotDensityRenderer_0.ColorScheme; if (this.colorRampComboBox1.Items.Count == 0) { this.ienumColors_0 = this.method_1(null, fields2.FieldCount); } else { this.ienumColors_0 = this.method_1(this.colorRampComboBox1.GetSelectColorRamp(), fields2.FieldCount); } bool flag = false; for (num = 0; num < fields2.FieldCount; num++) { IField field = fields2.get_Field(num); esriFieldType type = field.Type; if ((((type != esriFieldType.esriFieldTypeDouble) && (type != esriFieldType.esriFieldTypeInteger)) && (type != esriFieldType.esriFieldTypeSingle)) && (type != esriFieldType.esriFieldTypeSmallInteger)) { continue; } flag = true; string str = field.Name.ToUpper(); for (int i = 0; i < fields.FieldCount; i++) { if (str == fields.get_Field(i).ToUpper()) { goto Label_0145; } } goto Label_0147; Label_0145: flag = false; Label_0147: if (flag) { this.FieldsListBoxCtrl.Items.Add(new FieldWrap(field)); } } double[] numArray = new double[fields.FieldCount]; double[] numArray2 = new double[fields.FieldCount]; double[] numArray3 = new double[fields.FieldCount]; string[] strArray = new string[2]; ISymbolArray dotDensitySymbol = this.idotDensityRenderer_0.DotDensitySymbol as ISymbolArray; for (num = 0; num < fields.FieldCount; num++) { double num3; double num4; double num5; strArray[0] = ""; strArray[1] = fields.get_FieldAlias(num); ListViewItemEx ex = new ListViewItemEx(strArray) { Style = dotDensitySymbol.get_Symbol(num), Tag = new FieldWrap(fields2.get_Field(fields2.FindField(fields.get_Field(num)))) }; this.SelectFieldslistView.Add(ex); this.GetStaticsValue(fields.get_Field(num), out num3, out num4, out num5); numArray[num] = num3; numArray3[num] = num4; numArray2[num] = num5; } if (fields.FieldCount > 0) { this.btnUnSelectAll.Enabled = true; } this.txtSize.Text = this.idotDensityRenderer_0.DotDensitySymbol.DotSize.ToString(); this.txtPointValue.Text = this.idotDensityRenderer_0.DotValue.ToString(); double num7 = double.Parse(this.txtPointValue.Text); IDotDensityFillSymbol symbol = (this.idotDensityRenderer_0.DotDensitySymbol as IClone).Clone() as IDotDensityFillSymbol; IDotDensityFillSymbol symbol2 = (this.idotDensityRenderer_0.DotDensitySymbol as IClone).Clone() as IDotDensityFillSymbol; IDotDensityFillSymbol symbol3 = (this.idotDensityRenderer_0.DotDensitySymbol as IClone).Clone() as IDotDensityFillSymbol; this.MinsymbolItem.Symbol = symbol; this.MeansymbolItem.Symbol = symbol2; this.MaxsymbolItem.Symbol = symbol3; for (num = 0; num < (symbol as ISymbolArray).SymbolCount; num++) { symbol.set_DotCount(num, (int)(numArray[num] / num7)); symbol2.set_DotCount(num, (int)(numArray3[num] / num7)); symbol3.set_DotCount(num, (int)(numArray2[num] / num7)); } this.MinsymbolItem.Invalidate(); this.MeansymbolItem.Invalidate(); this.MaxsymbolItem.Invalidate(); }